Back

Unable to upload files

  • 1
  • Self Hosted
  • Storage
Ryan
31 Jul, 2024, 15:19

So this is a weird one, I'm no longer able to upload files to Appwrite. I'm using the latest versions of both self-hosted and the SDK but I'm getting this error appear in the Appwrite logs

TypeScript
[2024-07-31 15:09:10 *41.26]    NOTICE  Context::parse_multipart_data() (ERRNO 9010): parse multipart body failed, reason: first boundary mismatching: expecting '3' at 23, but it is '2'
[Error] Timestamp: 2024-07-31T15:09:10+00:00
[Error] Method: POST
[Error] URL: /v1/storage/buckets/:bucketId/files
[Error] Type: Utopia\Exception
[Error] Message: Param "fileId" is not optional.
[Error] File: /usr/src/code/vendor/utopia-php/framework/src/App.php
[Error] Line: 615

What's weird is that is was working fine until earlier today, I haven't changed anything, upgraded anything or restarted anything. I know for a fact that I am passing fileId into the SDK as I have a wrapper that defaults to using ID.unique():

TypeScript
const upload = await storage.createFile(
  Base.storage.bucket,
  ID.unique(),
  image,
);
TL;DR
Developers are unable to upload files to Appwrite due to a boundary mismatch error. The issue seems to be with the multipart data parsing. The error log mentions a missing fileId parameter. Possible solution: Ensure that the fileId parameter is correctly passed when using the SDK for file uploads.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more