PhotoBackup / client-android

The Android PhotoBackup client, made to free your pictures from your device
https://photobackup.github.io/
GNU General Public License v2.0
48 stars 15 forks source link

Chunked upload #46

Open jkufner opened 8 years ago

jkufner commented 8 years ago

There are two reasons for uploading a file in chunks:

  1. File upload may get interrupted so it is nice to continue when it ended
  2. File upload size is often limited to few megabytes so this would avoid this limitation and would work for any file size (videos).

Idea is to send file in chunks of some reasonable size, one chunk per http request. Once all chunks are transfered, the completed file is renamed to original name.

Basically the one thing to add is offset and length of the chunk and seek before writing. A hash of the whole file would be nice to check to be sure no chunk is missing.

stephanepechard commented 8 years ago

Yeah, it's something I should have work on quite a long time ago... Thanks to show interest in this, it will put it back on my todo list 👍