Hello!
I'm currently using the REST API to upload large JPEG files to an Appwrite storage bucket via a microcontroller, but I'm encountering an issue where the server does not return a response after I send the HTTP POST request with the multipart/form-data content. I ensure the Content-Length header is correctly calculated, and I stream the file data in manageable chunks to conserve memory. Despite this, the connection either freezes or times out without a server response. Could you clarify if there are specific requirements or best practices for handling file uploads through the REST API, such as chunked uploads, timeout settings, or required headers? Additionally, are there known cases where the API might not return a response under certain conditions, and how can I troubleshoot or resolve this?
You have some information and examples here: https://appwrite.io/docs/apis/rest#files
I don't remember what is exactly the max allowed chunk size the server will accept. @dlohani do you recall what is the number?
@WhMonkey another thing you can do is mimic the SDKs behavior, they are already designed to handle chunk uploading for bigger files. Then, also take into consideration that file size is limited on Cloud depending on your plan.
Also, just from curiosity, why do you upload directly to the API and not just use one of the SDKs?
Recommended threads
- Error getting preview of file
Rest Response: ``` { "message": "Server Error", "code": 500, "type": "general_unknown", "version": "1.8.1" } ``` Appwrite Logs ``` appwrite ...
- Storage images using custom domain retur...
Some of the images uploaded to my storage bucket returns this error: ``` { "message": "Project with the requested ID could not be found. Please check the value...
- Bandwidth limit for your organization ha...
I received an alert that I exceeded the Free plan bandwidth limit (showing 5.86 GB), but my dashboard tells a different story. The usage stats there are much lo...