transloadit/uppy · warning · Error
File is too big to store.
Error message
File is too big to store.
What it means
IndexedDBStore.put throws this when an individual file's data.size exceeds the store's maxFileSize option (default 10MB for the IndexedDB store in Golden Retriever). Golden Retriever uses this store to persist files across page crashes/reloads, and this guard prevents one huge blob from blowing the quota budget. The file is simply not persisted (recovery for it won't be possible).
Source
Thrown at packages/@uppy/golden-retriever/src/IndexedDBStore.ts:227
if (cursor) {
size += cursor.value.data.size
cursor.continue()
} else {
resolve(size)
}
}
request.onerror = () => {
reject(new Error('Could not retrieve stored blobs size'))
}
})
}
/**
* Save a file in the store.
*/
async put<T>(file: AddFilePayload): Promise<T> {
if (file.data.size != null && file.data.size > this.opts.maxFileSize) {
throw new Error('File is too big to store.')
}
const size = await this.getSize()
if (size > this.opts.maxTotalSize) {
throw new Error('No space left')
}
const db = await this.#ready
const transaction = db.transaction([STORE_NAME], 'readwrite')
const request = transaction.objectStore(STORE_NAME).add({
id: this.key(file.id),
fileID: file.id,
store: this.name,
expires: Date.now() + this.opts.expires,
data: file.data,
})
return waitForRequest(request)
}
/**View on GitHub (pinned to 5d4dedd02a)
Solutions
- Raise the limit: new IndexedDBStore({ maxFileSize: 25 * 1024 * 1024 }) passed to GoldenRetriever's service (custom ServiceWorker/IndexedDBStore wiring)
- Wrap store.put in a try-catch (or ensure GoldenRetriever's caller tolerates it) and accept that very large files aren't recoverable
- Lower total memory pressure by also tuning maxTotalSize alongside maxFileSize
- Consider ServiceWorkerStore instead for large files, or accept non-recovery of big files
Example fix
// before
new GoldenRetriever({ store: new IndexedDBStore() }) // default 10MB per file
// after
new GoldenRetriever({
store: new IndexedDBStore({ maxFileSize: 30 * 1024 * 1024, maxTotalSize: 200 * 1024 * 1024 }),
}) Defensive patterns
Strategy: try-catch
Validate before calling
const MAX = 10 * 1024 * 1024 const persistable = file.data instanceof Blob && file.data.size <= MAX if (persistable) await store.put(file)
Type guard
function isPersistable(file: { data?: Blob | null }, maxFileSize: number): boolean {
return file.data != null && file.data.size <= maxFileSize
} Try / catch
try {
await store.put(file)
} catch (err) {
if (err.message === 'File is too big to store.') return // skip recovery for this file
throw err
} Prevention
- Size-check before put() using the same maxFileSize
- Tune maxFileSize/maxTotalSize to your real upload profile
- Treat persistence failure as non-fatal — uploads still work
When it happens
Trigger: Golden Retriever saving state during upload; a file larger than maxFileSize is in the upload queue and IndexedDBStore.put is called for it. Throws synchronously inside put().
Common situations: Default 10MB limit with users uploading large media; app configured expires or other options but forgot maxFileSize; Treacherous when put is awaited without a catch and surfaces as unhandled rejection.
Related errors
AI-assisted analysis of transloadit/uppy@5d4dedd02a (2026-08-28).
Data as JSON: /api/errors/9fdd91b9468056fe.
Report an issue: GitHub.