'invalid input' error when client side uploading files to uploadthing on Vercel
Describe the Bug
When using client-side uploads with the storage-uploadthing package, the upload fails when hosting the payload app on Vercel. I recorded a video which demonstrates this:
https://github.com/user-attachments/assets/ecc0109c-b9fd-4496-b574-af3574432cb4
As you can see in the video, right after pressing the upload file button of the hosted version of the payload app, the request to /api/storage-uploadthing-client-upload-route fails with HTTP 400 and the return message {"message":"Invalid input"}. However, when running the same payload app locally, the uploading process works.
Link to the code that reproduces this issue
https://github.com/devj3ns/payload-uploadthing-bug-reproduction
Reproduction Steps
- Host the reproduction repository on Vercel (I can give you permission to the version I am hosting as a test if you want)
- upload a file
- the 'submitting' toast is shown infinitely, and the file is not uploaded
Which area(s) are affected? (Select all that apply)
plugin: cloud-storage
Environment Info
Binaries:
Node: 20.19.0
npm: N/A
Yarn: N/A
pnpm: 10.5.2
Relevant Packages:
payload: 3.32.0
next: 15.2.4
@payloadcms/db-mongodb: 3.32.0
@payloadcms/email-nodemailer: 3.32.0
@payloadcms/graphql: 3.32.0
@payloadcms/next/utilities: 3.32.0
@payloadcms/payload-cloud: 3.32.0
@payloadcms/plugin-cloud-storage: 3.32.0
@payloadcms/richtext-lexical: 3.32.0
@payloadcms/storage-uploadthing: 3.32.0
@payloadcms/translations: 3.32.0
@payloadcms/ui/shared: 3.32.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Home
Available memory (MB): 32694
Available CPU cores: 24
Same on my end deploying with vercel
I have exactly the same issue in production in Vercel but running just fine in development.
I'm not in Vercel currently with this. But I am wiring up a backend from scratch and seeing this as well.
I was making a POST request to my prepared url when it required PUT. Not sure if it's related, but I think I am good on my end now.
I'm also seeing this in production, it works just fine in dev.
@markflorkowski maybe has some input on what's going on 🙏🏼
Hi! Apologies for the long delay in getting a response here, are you still experiencing this on the latest version v3.72.0?
Hi! Apologies for the long delay in getting a response here, are you still experiencing this on the latest version
v3.72.0?
Just tried on v3.75.0, same issue
Fixed by #16115 ?
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.