Repository navigation
Description
π Reproduction steps
- Self-hosted Appwrite 2.7.4 with the bundled console (
appwrite/new:1.2.181-self-hosted,@appwrite.io/console22.4.0). - Open the console in Safari (macOS), go to Storage β any bucket β Create file.
- Pick a small image (for example a 65 KB PNG) and click Create.
π Expected behavior
The file is uploaded, as it is in Chrome with the same console, server and bucket.
π Actual behavior
Safari, normal window. The dialog closes and nothing happens. The console shows no error. The server receives the upload request, but without any form fields, and answers:
POST /v1/storage/buckets/{bucketId}/files β 400
Utopia\Http\Exception: Param "fileId" is not optional.
Safari, private window. The upload fails earlier with a toast:
Error preparing Blob/File data to be stored in object store
Chrome. The same console, server and bucket upload fine (201). In Chrome the request carries fileId and file as expected.
These things do not change the result in Safari:
- clearing all website data for the console domain;
- logging in again.
Analysis
src/lib/upload-queue/upload-manager.ts β queueUpload() saves the selected File object into IndexedDB (fileData: file) via db.saveUploadItem(). processUpload() later reads it back and passes it to storage.createFile().
- In Safari private browsing, WebKit refuses to store Blob/File values in IndexedDB, which explains the toast.
indexeddb.tsfalls back to in-memory items only for the Firefox read-only case (isIndexedDBMutationError), so Safari never reaches the fallback. - In a normal Safari window, the store succeeds, but the request that reaches the server has no form fields.
createFile()andchunkedUpload()always appendfileId, so the multipart body most likely ends up empty or unreadable when Safari serializes a File that was read back from IndexedDB. We have not captured the raw Safari request, so this part is an inference from the code and the server response.
Suggested fix
Keep the original File in memory for the current session and use it for the upload, using IndexedDB only for resumable metadata. Alternatively, store an ArrayBuffer, since processUpload already handles that case, and treat any IndexedDB write error, not only the Firefox one, as a reason to fall back to in-memory items.
π² Appwrite version
Version 2.7.4 (self-hosted). Console image appwrite/new:1.2.181-self-hosted.
π» Operating system
MacOS (Safari). Server: Linux, Docker.
π§± Your Environment
Upgraded from 1.9.6. The API itself accepts uploads from SDKs and curl; only the console in Safari is affected.
π Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Activity