ffsend-api icon indicating copy to clipboard operation
ffsend-api copied to clipboard

API to upload files from memory (such as a &[u8]?)

Open nightkr opened this issue 5 years ago • 3 comments

It would be great to be able to upload files without storing them on disk. Realistically, that probably means:

  1. Supplying an artificial FileData
  2. Supplying a custom Read

nightkr avatar Nov 09 '19 17:11 nightkr

Sounds like a nice idea, and implementing this is definitely possible.

Requirements for uploading files are:

  • Known file size
  • File name & MIME

I'm not sure when I'm able to implement this, due to other priorities. Nor do I know how much work it would be, as it has been a while when I last worked on the file handling part.

The current ffsend-api is a little messy, as it was iteratively developed along with ffsend without too much prior design work. It currently only accepts a File (I believe) in the Upload action. But I'd like to better design this to support different sources as well some time.

It's definitely something I'd like to add though. If you want to give implementing this a try, give it a go!

timvisee avatar Nov 11 '19 15:11 timvisee

Oh sorry, didn't see that the canonical repo seems to be on GitLab.

nightkr avatar Nov 11 '19 18:11 nightkr

@teozkr No problem. I'm monitoring both.

timvisee avatar Nov 11 '19 18:11 timvisee