threefoldtech / rmb-rs

RMB implementation in rust
Apache License 2.0
3 stars 1 forks source link

HTTP file uploads specs #77

Closed muhamadazmy closed 1 year ago

muhamadazmy commented 1 year ago

To get quickly with file uploads we will create a specific procedure for this as follows

muhamadazmy commented 1 year ago

Some implementation hints:

despiegk commented 1 year ago

sounds good to me

abom commented 1 year ago

I started to implement this flow, for the multipart uploads, I tried multiple crates (including multipart, multier...) that didn't work because it's outdated or doesn't play nice with hyper or provide only client side implementation, at the end I used mpart-async and it's working from the server side (api), will continue using it from the client side too (http workers).

abom commented 1 year ago

The implementation should be ready, in a successful upload

To run rmb with uploads enabled (to accept uploads), pass -u to enable uploads and --upload-dir <where to store uploads>, otherwise it will return 405 for any upload requests.

A small note, when constructing the payload for the upload message, don't add the prefix of e.g. msgbus to the command that will process the file, it's automatically handled in the remote side (as configured).