mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(API): let delegate forget uploaded urls
When uploading using the resumable protocol, we are now telling the delegate to forget the previously stored URL after successful upload. Previously it would have tried to return such a URL and thus made the system retry uploading a file that was already uploaded. Fixes #85 [skip ci]
This commit is contained in:
@@ -171,7 +171,10 @@ pub trait Delegate {
|
||||
/// Called after we have retrieved a new upload URL for a resumable upload to store it
|
||||
/// in case we fail or cancel. That way, we can attempt to resume the upload later,
|
||||
/// see `upload_url()`.
|
||||
fn store_upload_url(&mut self, url: &str) {
|
||||
/// It will also be called with None after a successful upload, which allows the delegate
|
||||
/// to forget the URL. That way, we will not attempt to resume an upload that has already
|
||||
/// finished.
|
||||
fn store_upload_url(&mut self, url: Option<&str>) {
|
||||
let _ = url;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user