Skip to content
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

Add support for creating a ResumableUpload object with a resumable_url. #61

Open
aviau opened this issue Mar 1, 2019 · 5 comments
Open
Labels
api: storage Issues related to the googleapis/google-resumable-media-python API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@aviau
Copy link

aviau commented Mar 1, 2019

Hello,

Does this library support resuming an upload?

More specificly, can I construct a working ResumableUpload object from a resumable_url ?

If yes, is there an example of this anywhere?

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Mar 4, 2019
@sduskis sduskis added type: question Request for information or clarification. Not an issue. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 2, 2019
@bachirelkhoury
Copy link

I'm also looking for this.

I thought the purpose is to be able to reinitiate an upload from the initial resumable_url so we can continue uploading the next chunks without having to start over.

Is there any good example for this?

@busunkim96
Copy link
Contributor

There isn't currently support for re-creating the ResumableUpload object from a resumable_url.
The intent is that you would keep the ResumableUpload object around and continue to upload chunks from it.

This is the sample that shows how to do resumable uploads:

https://googleapis.github.io/google-resumable-media-python/latest/google.resumable_media.requests.html#resumable-uploads

@bachirelkhoury
Copy link

Oh... right. So I guess our case is beyond the scope of the application. Where we might have lost internet connection or had to even restart the entire server and thought we can resume the upload.

I found something close to what I'm looking for here if anyone is looking: https://medium.com/google-cloud/google-cloud-storage-signedurl-resumable-upload-with-curl-74f99e41f0a2

@busunkim96
Copy link
Contributor

busunkim96 commented Jun 26, 2019

Looking at the library and product documentation on resumable uploads, I think it would be possible to add this as a new feature.

Documentation on resuming uploads with the resumable session uri:

Summary:

  • Create an empty PUT request to the resumable session URI with a Content-Range header indicating that current position is unknown
  • Send the request
  • Process the request. If a 308 Resume Incomplete is received, process the response's Range and continue uploading from that location.

@busunkim96 busunkim96 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: question Request for information or clarification. Not an issue. labels Jun 26, 2019
@busunkim96 busunkim96 changed the title document resuming Add support for creating a ResumableUpload object with a resumable_url. Jun 26, 2019
@bachirelkhoury
Copy link

@busunkim96 thanks for that! I tried the restful APIs and it works well!

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/google-resumable-media-python API. label Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/google-resumable-media-python API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants