PhotoBackup / server-php

The PHP PhotoBackup server implementation
MIT License
8 stars 4 forks source link

Chunked upload #7

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.

jkufner commented 8 years ago

See also https://github.com/PhotoBackup/client-android/issues/46

Zegnat commented 8 years ago

If this becomes part of the spec, I would work on that for sure.