Meanwhile, the previous click status Sended is changed to Synced, making it easier for people to understand the characteristic that a connection can sustain transmission
This commit introduces support for resumable file transfers when using the 'Save to Directory' feature.
Key changes:
- The WebRTC protocol is updated to include an 'offset' in the 'fileRequest' message.
- 'FileReceiver' now checks for partially downloaded files in the selected directory. If a partial file is found, it requests to resume the transfer from the offset of the existing file size. It uses '{ keepExistingData: true }' to append to the file.
- 'FileSender' now handles requests with an 'offset' and uses 'file.slice(offset)' to send only the remaining data.
- Progress calculation is adjusted to reflect the resumed download state.
This provides a more robust user experience for large file transfers, allowing recovery from interruptions like network loss or accidental tab closure.