Overview
A file chunking middleware that splits large files into safe-sized chunks, stores them with integrity verification, and serves them back as single files. Built for seamless Arkiv integration with support for any file type up to 50MB.
How it uses Golem DB
// Upload file with chunking
const formData = new FormData();
formData.append('file', file);
const response = await fetch('/files', {
method: 'POST',
body: formData,
headers: {
'Idempotency-Key': 'unique-key-123',
'BTL-Days': '7'
}
});
const result = await response.json();
// { file_id: 'uuid', message: 'Upload successful' }
// Download file
const fileResponse = await fetch(`/files/${result.file_id}`);
const fileBlob = await fileResponse.blob();