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 am using @uploadthing/svelte with SvelteKit and an UploadDropzone. Uploading normal images works, but uploading a .heic file fails at the UploadThing ingest PUT request with 400 Bad Request.
It reaches 100% upload progress, then UploadThing returns:
{
"error": "Failed to verify URL: Invalid signature"
}
Expected behavior: either the HEIC/HEIF file uploads successfully, or the client rejects it before upload with a clear unsupported-file-type error.
Actual behavior: the file appears to upload to 100%, then ingest rejects the signed URL as invalid.
This looks like it may be related to URL/signature canonicalization for the file MIME type. In particular, the query param appears as image%252Fheif, which decodes once to image%2Fheif and twice to image/heif.
Link to reproduction
Screencast_20260702_114226.mp4
To reproduce
Create a file route that accepts images, for example:
The same UploadThing route works for normal JPEG/PNG/WebP uploads.
This may be specific to .heic files that the browser reports as image/heif, or to the double-encoded x-ut-file-type=image%252Fheif query param used in the signed ingest URL.
👨👧👦 Contributing
🙋♂️ Yes, I'd be down to file a PR fixing this bug!
Provide environment information
Describe the bug
I am using
@uploadthing/sveltewith SvelteKit and anUploadDropzone. Uploading normal images works, but uploading a.heicfile fails at the UploadThing ingest PUT request with400 Bad Request.The selected file is:
20260625_144458.heic5741430image/heifThe generated ingest URL contains:
The PUT request goes to:
It reaches 100% upload progress, then UploadThing returns:
Expected behavior: either the HEIC/HEIF file uploads successfully, or the client rejects it before upload with a clear unsupported-file-type error.
Actual behavior: the file appears to upload to 100%, then ingest rejects the signed URL as invalid.
This looks like it may be related to URL/signature canonicalization for the file MIME type. In particular, the query param appears as image%252Fheif, which decodes once to image%2Fheif and twice to image/heif.
Link to reproduction
Screencast_20260702_114226.mp4
To reproduce
Use @uploadthing/svelte with createUploader("unifiedUploader") and .
Select a .heic image where the browser reports the file MIME type as image/heif.
Observe the ingest PUT request.
The upload progress reaches 100%, but the PUT request returns:
Additional information
Additional Information
Client logs from
onBeforeUploadBegin:The same UploadThing route works for normal JPEG/PNG/WebP uploads.
This may be specific to .heic files that the browser reports as image/heif, or to the double-encoded x-ut-file-type=image%252Fheif query param used in the signed ingest URL.
👨👧👦 Contributing
Code of Conduct