Giter Club home page Giter Club logo

Comments (8)

lmyslinski avatar lmyslinski commented on September 13, 2024 1

@fenos Thanks for the detailed response. I understand it's in beta - for now I've switched to XHR which works pretty well. I'll soon need to add bulk upload support so I'll give it another shot with removeFingerprintOnSuccess

from storage.

AkramEld avatar AkramEld commented on September 13, 2024 1

@lmyslinski resumable upload is now considered stable! 🎉 All the issues above mentioned are now resolved

Hi im using "@uppy/core": "^3.9.2",. Im experiencing what lmyslinski explained. uppy is saying the image upload succeeded but the actual image is not being uploaded to supabase. I've noticed this is only happening to some images

from storage.

fenos avatar fenos commented on September 13, 2024

Hello @lmyslinski thanks a lot for your feedback!
Let's go step by step. Most of the issues are not real issues and how the protocol is supposed to work.

It's impossible to reupload files - I have to rename the files during the upload, as otherwise we get a 409, which I didn't manage to get around with custom policies

This is expected, since uploading a file on the same path (essentially overwriting a file) you are required to provide the x-upsert=true header, if you don't pass this header storage will not allow you to upload to a path where a file already exists.

However, we do strongly recommend using the pattern of creating a unique name for each of the files like you are doing, since overwriting files on the same path will not bypass the browser cache and the CDN cache takes a little time to propagate the changes

See documentation: https://supabase.com/docs/guides/storage/uploads/resumable-uploads#overwriting-files

if the file name/metadata doesn't match between supabase and uppy, the upload just fails with a 404 - pretty much impossible to debug, I've fixed this with trial & error

Could you explain this further, not sure i understood this correctly

every successful TUS upload involves 404 calls - this should not be a part of a successful data flow

This is how the protocol works, when you start the upload of a file, tus creates a fingerprint and stores it in the local-storage, when you stop the upload and resume it later, TUS will re-use the same upload URL. it first sends a HEAD request to receive back the upload offset so that it can resume where it left-off. In case the upload is successful by default TUS doesn't remove that fingerprint from the local-storage see removeFingerprintOnSuccess, if you delete the file later on, it will try to call the same upload URL but it is now deleted so you'll receive a 404 and it will create a new upload url automatically.

So when I upload a file via Uppy with TUS, Uppy reports that the upload was successful. Yet, when I subsequently try to access the upload file on my backed, the file is not found

This issue is also caused by the flag removeFingerprintOnSuccess if not set to true it uses the default value false.

When the upload succeeds the browser still keeps the fingerprint of the file in the local-storage.
Due to a limitation of tus-node-server it is currently advised to set this value to true , this should solve all the stability problems you are currently having with Resumable upload, since once the browser completes the upload will not be holding that reference in the local-storage for future lookups.

This happens roughly 5-10% of the time. This is a big no-go for me and I'm currently looking for a more stable alternative. I believe this is likely due to TUS implementation issues, I'd appreciate a recommendation for a more stable API

The protocol implementation is a Beta feature in our current platform so there are currently small perks like the above.

However, we have contributed back to the TUS protocol a lot in the past months and we have improved stability dramatically, as a sneak-peak we will announce TUS to be out of beta very soon, entering a stable release.

We are also working on having TUS uploads embedded in the Supabase SDK so that we can set default values more consistently, (this will come a bit later the stable release)

for example:

await supbase.storage.from('bucket').resumableUpload('path', file, {
  onProgress: (uploaded, remaining) => {},
}) 

the UI for storage is super slow
Could you please send a support ticket i would be happy to look into this personally for you

Again, thanks a lot for the feedback.
I Hope with adding removefingerprintonsuccess: true and the upcoming stable release of TUS you'll have a great experience with Storage

Let me know if you have any more questions

from storage.

fenos avatar fenos commented on September 13, 2024

Awesome!
Closing for now, i'll update this issue when we release TUS stable release.

However, feel free to also update me here for anything else. In case we'll just re-open it.
Thanks @lmyslinski

from storage.

fenos avatar fenos commented on September 13, 2024

@lmyslinski resumable upload is now considered stable! 🎉 All the issues above mentioned are now resolved

from storage.

1-Felix avatar 1-Felix commented on September 13, 2024

Hi im using "@uppy/core": "^3.9.2",. Im experiencing what lmyslinski explained. uppy is saying the image upload succeeded but the actual image is not being uploaded to supabase. I've noticed this is only happening to some images

I run in into this issue too, where the upload seems to succeed but nothing gets uploaded to Supabase. Clearing the cache/localstorage seems to fix the issue, for me. But not sure what's the cause exactly.

from storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.