Uppy: uploaded y/n

Created on 26 Jan 2018  路  5Comments  路  Source: transloadit/uppy

I uploaded files to the master.tus.io endpoint. Now I change to my proprietary endpoint and then it works for new files, but files already uploaded to master.tus.io are considered 'already uploaded' (but all progress is still at zero, which is also a bit odd). It looks like after cleaning the browser cache this persists. In browser cognito mode it works as expected, i.e. files are uploaded to my proprietary endpoint.

Question: what determines whether uppy considers a file as already uploaded?

Improvement Tus

Most helpful comment

FYI, since https://github.com/tus/tus-js-client/commit/2f8c14363bf040f91dd1adbe94ec7082db0b7513 the endpoint will be included in the fingerprint. It will be release in the next version soonish.

All 5 comments

Most likely this is because of tus-js-client's resume option鈥攚hen enabled, it stores data about the file and the endpoint in localStorage, so that it can pick the upload back up if it was interrupted. When you change the endpoint option, the old URLs are still in localStorage. Doing localStorage.clear() in your browser console should fix it. If you don't need to be able to pick up the upload again later, you can set resume: false in the Tus plugin options.

We could mitigate this in Uppy by setting the fingerprint() option in tus-js-client and adding in the endpoint URL, that's probably a good thing to do regardless.

Yeah, localStorage.clear() works!

I think adding in the endpoint URL is essential, otherwise when uppy gets popular and widespread the first endpoint upload will 'hijack' subsequent uploads of the upload-file to other endpoints.

@Acconut what do you think?

That sounds like a good improvement, in particular since this is not the first time someone steps into this pit. I added it to my backlog but if someone wants to work on this quick fix in the meantime, I am happy to assist.

FYI, since https://github.com/tus/tus-js-client/commit/2f8c14363bf040f91dd1adbe94ec7082db0b7513 the endpoint will be included in the fingerprint. It will be release in the next version soonish.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

matthewhartstonge picture matthewhartstonge  路  3Comments

oyeanuj picture oyeanuj  路  3Comments

NihadOb picture NihadOb  路  3Comments

anushkamds picture anushkamds  路  3Comments