workers-rs icon indicating copy to clipboard operation
workers-rs copied to clipboard

[BUG] `UploadedPart` is unserializable/constructable therefore cannot be passed to MultipartUpload::complete in a subsequent request

Open lwansbrough opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What version of workers-rs are you using?

0.0.15

Describe the bug

Because MultipartUpload::complete requires instances of UploadedPart, we need to be able to construct or deserialize the UploadedPart iterable list from the request body. Ideally a method would be available to pass the request or its body directly to a constructor to avoid having to manage deserialization in my worker code. Multipart uploads to R2 do not appear to be supported until this is fixed.

Steps To Reproduce

No response

lwansbrough avatar May 08 '23 02:05 lwansbrough

If I can do let uploaded_parts = req.json::<Vec<UploadedPart>>().await?; then we really just need UploadedPart to be de/ser.

lwansbrough avatar May 08 '23 05:05 lwansbrough