Closed muhamadazmy closed 1 year ago
Some implementation hints:
{path: <path>, cmd: <remote cmd to call remotely>}
sounds good to me
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).
The implementation should be ready, in a successful upload
msg.dat
rmb-upload-cmd
with the file path in msg.dat
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).
To get quickly with file uploads we will create a specific procedure for this as follows
msgbus.system.file.upload
is handled in local rmb (the uploader) the body of this command must contain the following payload body (the payload part of the message)path
to the local filecmd
the remote service queue to accept the fileupload
command must have a single destination. can't fan out.rmb-upload-cmd