evilcorpltd / aTox

Reasonable Tox client for Android
GNU General Public License v3.0
353 stars 56 forks source link

robust file transmission #1051

Open giiutfff opened 2 years ago

giiutfff commented 2 years ago

When sending a big file under unstable network, the transmission often got interrupted. And the part already sent will be discarded. The file must be sent again from the start, and still risking the failure of interrupted network. Thus makes sending big files nearly impossible. Is it possible to recover an interrupted transmission, and continue(resume) from the position of the file where already sent?

Another problem of file transmission is all pictures were sent last session(before app/device be restarted) will not be displayed. While received pictures are displayed just fine. I don't know is this a bug or intentional design, but it would be nice to display sent pictures as well(exclude those pictures failed the transmission). ie. Copy the pictures that were sent successfully to app data, so they can be displayed next session, even if the source file is unavailable.

Kind regards

robinlinden commented 1 year ago

When sending a big file under unstable network, the transmission often got interrupted

Yeah, there are some issues in the current file transfer implementation. A lot of opening/closing/seeking in files, but a refactor of that is in progress and should hopefully make things a lot faster.

all pictures were sent last session(before app/device be restarted) will not be displayed

This is by design right now, but I want to change that. It's part of the way Android's permission system is set up, so aTox can't access any files after the current session. I figure we can maybe generate smaller thumbnails and store them in aTox's internal store to have them keep working across sessions. :)

Thank you for the report!

robinlinden commented 3 days ago

1180 should fix most of the stability issues with outgoing transfers, as well as speed them up a lot.