tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads
https://tus.github.io/tusd
MIT License
2.95k stars 467 forks source link

Close unfinished file and set max file size #1018

Closed mskayali closed 8 months ago

mskayali commented 9 months ago

If you get binary data by a stream and you wouldn't know the total stream size but you just able to understand this is the end of file when stream is done. You need to finalize the file.

This kind of IoT issues can be solved with this commit first set file-length as "max" to maximize the file length then upload stream bytes finally send "Finish-Incomplate-File" header as "?1" by a head request

Acconut commented 8 months ago

Thank you for the PR, but the tus protocol and tusd already support a very similar approach for handling unknown file sizes. I described this in my comment in #1017