[solved] File Upload from Rust Code returns 500 Internal Error at last chunk
- 0
- Self Hosted
- Storage
- REST API
Warning: file_get_contents(/storage/uploads/app-650f0846f11fae53fe7c/651155e99b8b3b3523d4/tmp_66265f0a6129adc5a67a.mp4/66265f0a6129adc5a67a.part.79): Failed to open stream: No such file or directory in /usr/src/code/vendor/utopia-php/storage/src/Storage/Device/Local.php on line 181
[Error] Timestamp: 2024-04-22T12:59:03+00:00
[Error] Method: POST
[Error] URL: /v1/storage/buckets/:bucketId/files
[Error] Type: Exception
[Error] Message: Failed to read chunk /storage/uploads/app-650f0846f11fae53fe7c/651155e99b8b3b3523d4/tmp_66265f0a6129adc5a67a.mp4/66265f0a6129adc5a67a.part.79
[Error] File: /usr/src/code/vendor/utopia-php/storage/src/Storage/Device/Local.php
[Error] Line: 183
this is what my Appwrite Docker Container returns as log. The file is round about 300mb big and the error always appears at the last chunk.
I have no idea what can create this error by looking at the loggings. I added Error handling to my rust code and get this error:
worker::video_cutter: Failed to upload chunk: HTTP 500 Internal Server Error - {"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.4"}
Any tips for debugging is highly appreciated.
ok found the error I think. Thanks to the great feature of looking through Discord conversations over the appwirte website I found the bug report about "content-range end should be 1 less than file size" And of course was the error that my limits where not -1.
[solved] File Upload from Rust Code returns 500 Internal Error at last chunk
Recommended threads
- Hosting Issues with Static IP not domain...
I have a machine with Static Public IP. I want to host Appwrite Site on it but I tried it but it doesn't allow IP addresses in Domain names. What should I do h...
- encrypt and decrypt buckets
I have a bucket where I switched from encryption to not encrypting files. I later realized that files already uploaded earlier stay encrypted. Now I have a buck...
- Unable to Create Storage After Upgrading...
We upgraded our Appwrite instance from version 1.8.0 to 1.9.0 and successfully ran the migration process. However, after the upgrade, we are no longer able to c...