Ivan
Explore posts from serversCDCloudflare Developers
•Created by Ivan on 4/29/2023 in #workers-help
Unable to perform multi-part upload for files
Hi all,
I'm currently trying to use a worker to perform a multipart upload of a file on my front-end. Since my website is hosted on vercel, I have no choice but to tunnel my request through their APIs in order to reach my worker. As a result, I have a hard 8mb limit on the size of my function body.
However, when I try to perform a multi-part upload, I get the following error
It seems to me like the individual upload portions succeed but then when it comes to the final step of completing the multipart upload, I get a 400 error because of the error that
completeMultiPartUpload
throws.
I'm a bit confused as to how I might be able to fix this. I've tried to modify my partition function so that the last element is always at least 5MB. I originally started slicing from the front (Eg. 12mb file becomes 5 5 2 and the new algorithm would slice it as 2 5 5 ).
Any help would be much appreciated. I am using NextJS with typescript and am happy to share source code if needed.14 replies