NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 440 forks source link

Better handling of small and 0 byte files #3154

Closed MSevey closed 6 years ago

MSevey commented 6 years ago

Need to add testing about uploading and downloading 0 byte files. Currently this case is not reported correctly, progress stays at 0%. Progress should pretty instantly go to 100% and the redundancy should be set to the target redundancy.

This should also apply to small files under 4096 bytes where the data can just be stored in the metadata.

chrsch commented 6 years ago

Currently the Sia API returns 405 method not allowed if try to download a 0 byte sized file (see renter module code).

ChrisSchinnerl commented 6 years ago

We talked about this yesterday and it seems like it makes sense to wait for the new sia file format to be done before we start working on that. Once we got the new format, we can just store tiny files directly in the sia file as "metadata" instead of uploading it to the network.