-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resuming chunked uploads #2070
Comments
I have some huge files (videos) from holiday to upload and I know they won't survive wifi timeout when phone automatically locks. This leads to me having to actively use the phone because I know that if the upload cancels it will start from the beginning, and without me forcing the WiFi to on actively, the upload will never complete as its resuming starts again at zero. This is why I think this feature is rather important. |
I suspect this would make affect users using instant upload. Such users usually expect no interaction at all with the client as everything is uploaded. (are videos included ?) In case of big files, the upload might never complete due to the above reasons (network disconnect), so such user might wonder later why their files still haven't reached the server after so much time. |
This is getting more annoying over time. I can't comfortably upload my holidays videos on mobile as they keep failing when I forget to manually keep my mobile phone unlocked / connected. |
Hi @PVince81 , I agree with you about this feature, it is pretty annoying for the user to have to be actively using the phone so that the big upload is completed. We will address this problem for coming releases, but not for the 2.5.1 @michaelstingl since it should be ready in January and will include the new camera uploads. To fix the big uploads problem we would need to use the new chunking endpoint as well. |
I've also experienced some issues, that might have been easier if we support upload resuming: During my holidays I was not always having reliably wifi connections. For uploading smaller files this was not a issue - but with uploading several pictures (and videos) the uploads would fail inbetween. But instead of resuming the uploads, they would need to start from the beginning. Photos would upload eventually since the file size is just around 5-10MB - but with larger files (movies) it was a very painful experience. Additionally I noticed, that when putting the app in the background (by turning off the phone, or switching context for example to the browser), the uploads would also just stop at one point. Switching back would start the upload process again. |
@davigonz i would like to work on this issue, can I start? |
@davigonz I would like to work on this. |
@harshitbansal05 thank you for being interested in this issue but let's start with #2071 and #2080 first and we will talk about this issue then. |
@SD1998 We are thinking about changing our network library for the next release, so I would prefer not to start with this issue before that part is finished. |
@PVince81 just a question about the last step with chunked uploads:
How long does the server take to build the file once all the chunks are uploaded? Is there any way to check that file is completed and ready to be moved to the final destination? |
@davigonz the assembly depends on the size of the file and number of chunks. The duration is likely similar to the duration of the last PUT when using the old chunking. There is currently no mechanism to track this. However there's a POC for a possible mechanism to "check later" here: owncloud/core#31851 |
@PVince81 how have you handled this scenario in core? Is it possible to know the content of |
in the web UI we use a transfer id based on the final file path and time stamp: https://github.com/owncloud/core/blob/v10.0.9/apps/files/js/file-upload.js#L45 |
It makes sense, I will follow that path, thanks! |
With the next scenario:
@PVince81 how do you know this is forbidden with the new endpoint? Because I've noticed that with the old chunking endpoint you get an error when trying to upload the first chunk to the final destination while with the new endpoint, since the chunks are saved in a different folder than the final one protected by permissions, there's no Any clue about this? Thanks |
A 500 error is likely a bug, please report in core with the matching curl requests for the chunk upload (unless easily reproducible in web UI and cheating the permissions) Currently the expectation is that the final MOVE tells you whether the operation can be done or not. There is no way to check this upfront because the final destination path is only known during the final MOVE. So expect a 403 during MOVE. |
@PVince81 I have already opened an issue (owncloud/core#33416) and noticed that web UI shows the error |
@davigonz this might be because the file list reads the "oc:permissions" of the current folder to determine whether read-only or not, so it does not even start the upload. You can likely cheat this way:
you'll likely see that the network process is the same as for mobile now |
@PVince81 I managed to reproduce it in the same browser as well, as you can see in the gif attached in the core issue I created, I was just curious about that error message. Thanks for the explanation! |
This will need to wait a bit more due to architectural changes that are being carried out in the Android app. It makes totally sense to start with chunked upload when the app contains those improvements and avoid additional work. Please follow up #2351 to know the status of the architectural changes. |
To include in new arch when TUS is finally decided to be included. (#2978) |
Steps to reproduce
Expected result
Upload resumes from last starting point (takes less time)
Actual result
Upload does not resume (see #2069) or would restart transfer from scratch.
Versions
Android app 2.5.0
Android 5.1.1
The mobile app should use the new chunking endpoint:
The idea is to just resume uploading the failed chunks and assume the other chunks are still on the server.
Beware that if no chunk upload is happening within more than 2 days, the transfer folder will not exist any more and old chunks are deleted. So if you get a 404 on PUT, assume the transfer was cancelled and start over.
Related: #1400
The text was updated successfully, but these errors were encountered: