You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m having a weird issue with file uploads using FilePond and TUS with Supabase Storage. Files under 6MB upload just fine, but anything larger gets stuck at a certain percentage, usually around the 6MB chunk size.
To Reproduce
Open the Supabase Local CLI Dashboard.
Create a bucket in Storage.
Attempt to upload a file that is under 6MB and check if it uploads successfully.
Attempt to upload a file that is above 6/7 MB.
Take note if the upload process stalls at a specific percentage between 0 and 99%.
Error shows: Failed to upload 7MB example.jpg: tus: failed to resume upload, caused by [object ProgressEvent], originated from request (method: HEAD, url: https://127.0.0.1:8443/storage/v1/upload/resumable/RklMRV9VUExPQURfQlVDS0VULzdNQiBleGFtcGxlLmpwZy9jZTI2YzMyOC1mNjU4LTQxYWQtYjdkZS0yZTM2NTBhNzk1OTE, response code: n/a, response text: n/a, request id: n/a).
Expected behavior
I thought the larger files would upload without any problems, especially because Resumable Uploads with TUS are designed to handle large file loads. It shouldn't fail for simple files under 6MB at all. Otherwise, my app will be useless. Our users could upload files larger than hundreds of megabytes, so this is not acceptable.
Screenshots
I have a video recording showing the issue in my Next.js app, but here's a quick text log of what I see from the Supabase CLI local dashboard.
Uploading 1 file... 0s remaining – 84.79%
Do not close the browser until it's completed
And then it fails with:
Failed to upload 7MB example.jpg: tus: failed to resume upload, caused by [object ProgressEvent], originated from request (method: HEAD, url: [insert URL here]), response code: n/a, response text: n/a, request id: n/a
Version of supabase-js: "@supabase/supabase-js": "^2.45.4"
Version of Supabase CLI: 1.200.3
Version of Node.js: v22.8.0
Additional context
I disabled the built-in chunking in FilePond, thinking it might help, but the issue still persists.
Here’s a snippet of my upload code for context:
<FilePondfiles={field.value}oninit={()=>setIsFilepondReady(true)}onupdatefiles={(fileItems)=>field.onChange(fileItems.map((fileItem)=>fileItem.file))}server={{process: async(fieldName,file,_metadata,load,error,progress,abort)=>{constformData=newFormData();formData.append(fieldName,file,file.name);constfileName=file.name;constuniqueFileName=`${newDate().getTime()}-${fileName}`;constgeneratedFileName=`${userId}/${uniqueFileName}`;constupload=newtus.Upload(file,{endpoint: `${env.NEXT_PUBLIC_SUPABASE_URL}/storage/v1/upload/resumable`,retryDelays: FileUploadProps.chunkRetryDelays,headers: {authorization: `Bearer ${session?.access_token}`,'x-upsert': 'true',},uploadDataDuringCreation: true,uploadLengthDeferred: false,removeFingerprintOnSuccess: true,metadata: {bucketName: env.NEXT_PUBLIC_FILE_UPLOAD_BUCKET,objectName: generatedFileName,contentType: 'image/png',cacheControl: '3600',},chunkSize: 6*1024*1024,// It must be set to 6MB for nowonError(caughtError){error(caughtError.message);},onProgress(bytesUploaded,bytesTotal){progress(true,bytesUploaded,bytesTotal);},onSuccess(){console.log('Download %s from %s',upload?.options?.metadata?.objectName,upload?.url,);load(upload?.url?.split('/')?.pop()??'');},});upload.findPreviousUploads().then(function(previousUploads){if(previousUploads.length){upload.resumeFromPreviousUpload(previousUploads[0]);}upload.start();});return{abort: ()=>{upload.abort();abort();},};},}}{...FileUploadProps}/>
Thanks for any help or insights you can provide!
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
I’m having a weird issue with file uploads using FilePond and TUS with Supabase Storage. Files under 6MB upload just fine, but anything larger gets stuck at a certain percentage, usually around the 6MB chunk size.
To Reproduce
Failed to upload 7MB example.jpg: tus: failed to resume upload, caused by [object ProgressEvent], originated from request (method: HEAD, url: https://127.0.0.1:8443/storage/v1/upload/resumable/RklMRV9VUExPQURfQlVDS0VULzdNQiBleGFtcGxlLmpwZy9jZTI2YzMyOC1mNjU4LTQxYWQtYjdkZS0yZTM2NTBhNzk1OTE, response code: n/a, response text: n/a, request id: n/a)
.Expected behavior
I thought the larger files would upload without any problems, especially because Resumable Uploads with TUS are designed to handle large file loads. It shouldn't fail for simple files under 6MB at all. Otherwise, my app will be useless. Our users could upload files larger than hundreds of megabytes, so this is not acceptable.
Screenshots
I have a video recording showing the issue in my Next.js app, but here's a quick text log of what I see from the Supabase CLI local dashboard.
And then it fails with:
Supabase.Storage.Fails.to.Upload.Files.above.6MB.mp4
System information
MacOS Ventura 13.2.1
- MacBook Pro M1 Pro.(Version 1.63.0 (54427) - Chromium Engine Version 129.0.6668.90)
."@supabase/supabase-js": "^2.45.4"
1.200.3
v22.8.0
Additional context
I disabled the built-in chunking in FilePond, thinking it might help, but the issue still persists.
Here’s a snippet of my upload code for context:
Thanks for any help or insights you can provide!
The text was updated successfully, but these errors were encountered: