subins2000 / simple-peer-files

A library to send files over WebRTC
Mozilla Public License 2.0
35 stars 9 forks source link

window.requestFileSystem #2

Open MariasStory opened 3 years ago

MariasStory commented 3 years ago

Hi @subins2000, it seems to be thought through solution, thanks for open sourcing ;-) Please implement direct file write with window.requestFileSystem an the possibility to continue partially downloaded file.

Let's say, peer1 send a file to peer2 and the connection is broken. After some time, the peer1 is sending the same file to peer2. The peer2 is pointing to the partially downloaded file and the download continues where is broke.

subins2000 commented 3 years ago

I see that winfow.requestFileSystem is a Chromium thingy. Implementing that is not a priority since the main intention of this library is cross-platform/browser file share.

As for file resuming, if the connection close in between and sender uploads the file again with the same file ID, then the transfer will be continued on the receiver side.

MariasStory commented 3 years ago

Hi, thanks for the answer. I just tried with the webdrop and indeed the file transfer is resumed. However, at least in Chromium, it gets somewhat messy with the parts of the files, that need to be combined.

You can close the issue.