OpenArchive / Save-app-ios

Secure Mobile Media Preservation
https://open-archive.org/
GNU General Public License v3.0
10 stars 3 forks source link

Resumeable uploads over multiple days / app sessions #155

Closed n8fr8 closed 5 years ago

n8fr8 commented 5 years ago

User starts upload of 1GB video file. The internet goes down half way through. The next day, the internet comes back, and they want to resume uploading the remainder of the file.

How could our current resume / upload tracking support this, is it simply something within the WebDAV layer or more needed?

n8fr8 commented 5 years ago

Here is the documentation on Nextcloud's Chunking support: https://docs.nextcloud.com/server/stable/developer_manual/client_apis/WebDAV/chunking.html

This is exactly what we need to support the required use case.

n8fr8 commented 5 years ago

What is interesting about this is that the chunk uploads just standard WebDAV uploads to a temporary directory. Once we upload all of our chunks, we issue a WebDAV "move" command to the actual desired project folder, and the server will assemble them.

I think this is not a standard WebDAV feature, so this will need to be available as an advanced setting "Enable upload chunking (NextCloud Only)"

n8fr8 commented 5 years ago

Exciting news - I implemented this on OA Android last night and it works as advertised. I can force stop the app and even restart the upload on any future date, since the persistence of the previously uploaded chunks is permanent (until the user issue a MOVE or DELETE command)

Again, this is a NextCloud specific feature, so it needs to be available as setting / option for the user to enable.

n8fr8 commented 5 years ago

Code for Android impl is here: https://gitlab.com/n8fr8/openarchive/commit/de0b88d604b98f2fed41135ceb7c84726da2c920#dd1ec280e447edac2089d4733a77e39c4e2e7cf5_159_173

foundscapes commented 5 years ago

Amazing!! can @tladesignz implement this for ios?

n8fr8 commented 5 years ago

Yes. It doesn't require any changes to the core webdav library, just a specific means of using it. We can talk when he is back, but I think this is a MUST requirement, based on feedback, and it really allows us to promote usage as highly reliable tool in very poor connectivity areas. It also helps with the Apple background resume issues.

tladesignz commented 5 years ago

Will be contained in build 39.