filesystem_spec
filesystem_spec copied to clipboard
Open the http file system in the wb mode
We can only use rb mode in the HTTP file system for now. It will be great if we can support wb mode.
https://github.com/fsspec/filesystem_spec/blob/61cdf52cd0aaf524945ffb83502be39fccaee363/fsspec/implementations/http.py#L350-L351
Since we do have a pipe using POST or PUT methods, this is perfectly possible. Because the operation would not be multi-part, the whole of the file would need to be buffered and the upload only happens when the file is closed (.flush(final=True)).