tus-js-client icon indicating copy to clipboard operation
tus-js-client copied to clipboard

Automatic cleanup of upload records in localStorage to avoid QuotaExceededError

Open Floppy opened this issue 4 months ago • 2 comments

In https://github.com/transloadit/uppy/issues/5644 and https://github.com/manyfold3d/manyfold/issues/4909, I found that tus-js-client was eventually filling up localStorage with upload records, leading to QuotaExceededError whenever another upload is attempted. For my app, I've written a method to automatically sweep up old records (https://github.com/manyfold3d/manyfold/pull/4923), which solves the problem.

I'm not sure if this is a feature that could be usefully pushed upstream into this library, or if it's something that's already handled and I've just not configured properly. Any thoughts welcome, I'm happy to submit a PR on this if helpful.

Floppy avatar Oct 28 '25 14:10 Floppy

Would the removeFingerprintOnSuccess option help? Fingerprints for completed uploads will be removed and don't take up space in localStorage.

Acconut avatar Nov 03 '25 17:11 Acconut

Ooh, that might be the thing I missed. I'll try it out.

Floppy avatar Nov 03 '25 18:11 Floppy