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
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
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