-
-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the [Docs](https://docs.supabase.com), GitHub [Discussions](https://github.com/supabase/supabase/discussions), and [Discord](https://discord.supabase.com).
Describe the bug
When uploading .docx
and .xlsx
files using tus-server-node
with @tus/s3-store
(configured to use Supabase Storage via S3-compatible API), the files are saved corrupted. They cannot be opened by Microsoft Word, Excel, or Google Docs/Sheets after being uploaded.
Interestingly, .pdf
files upload and open correctly using the exact same pipeline. Additionally, when I tested the same codebase with a native AWS S3 bucket instead of Supabase, all file types — including .docx
and .xlsx
— worked correctly. This suggests the issue may be related to Supabase's S3 compatibility.
To Reproduce
https://github.com/EnriqueSantos-dev/uppy-tus-server-supabase-s3-bug
Expected behavior
The uploaded .docx
and .xlsx
files should be saved and retrievable in a usable format, just like .pdf
files. All supported MIME types should be stored without corruption.
Screenshots
No visual errors, but files are unreadable after upload. Opening them triggers a warning or error from Google Docs/Excel indicating the file is invalid or corrupted.
System information
OS: windows (wsl 2)
Browser: Chrome (latest)
Version of supabase-js: N/A (upload uses direct S3-compatible API)
Version of Node.js: 22.15.0
Server: Next.js v15.1.8 (App Router)
tus-server-node: @tus/server v2.2.0 and @tus/s3-store v2.0.0
Client: uppy.js v4.4.4 with @uppy/tus v4.2.2
Additional context
Here is a summary of my configuration:
-
@tus/s3-store
is configured withforcePathStyle: true
and uses Supabase credentials. -
uppy.js
is configured with the correct MIME types:allowedFileTypes: [ "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ]
-
Files are uploaded successfully, but corrupted when retrieved — even directly from the Supabase dashboard.
-
Uploading to a native AWS S3 bucket using the exact same setup works perfectly for all file types.