-
Notifications
You must be signed in to change notification settings - Fork 569
feat(storage): Restart delete resumable upload config #29215
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
Changes from 14 commits
3fa291c
1d9fbca
bdedec7
58a2bee
ea8953c
6e083c5
5815149
2066d8f
e551a35
f8bc05d
7ee0fe8
0ec9885
10c9852
64391e2
e48c861
50e71bc
d08b2e2
04e1e23
175d236
cdde7bf
65ceabc
6c4e392
65844fd
4fd78e0
902800c
663de4b
33de268
ff5073f
37cb1bc
1210472
2c5224d
200062f
cb7c51d
77dcc05
2b8f585
e1a5fb3
3b5eaca
6f92f6c
b82901c
e5385d6
fef8ace
53e5ed0
5633a93
1ea277b
a2c297b
bbec498
b41633a
a2823f6
da9fbc7
60b9aae
07cb4df
1fec7f0
7d52315
62d4480
26683d7
fbeaadc
7e60a57
abf5624
aea3416
092b601
8edadc3
a76d457
f61875f
9f0b149
6bbf772
33d0824
ca348d3
bdd681c
3acae6f
1aa9693
d75d774
62125ca
df76ba6
0bf6c9c
8664d8f
ce8213f
5dd2b43
8a626d5
8c8d542
aae723b
4d1ba92
8432dfe
15efc06
456744c
d70e31b
6f43863
ffe96dd
42b43c4
0e840e6
1182321
aac2567
7240576
acb19ef
1f88c5f
a69d109
390082e
708941e
c1cf542
b4e0da5
9629158
9acf599
d42ac54
cfe4024
8c2013e
ae45dde
5bd49ed
fac851d
a226fdc
f5b2dfe
fe726fd
b7928c1
c6f7dec
a326367
3b97306
01edc59
c1135d1
d755e44
3ac87c4
acafa31
6173c54
1df1fed
c013e1a
f4c25ad
aa7c83e
75aedd4
8a68937
629f401
689ac36
7379c48
6285229
4b9b6ad
3dbdc0b
5cf5800
b53089f
f2e4082
ca63a0e
f4511ba
04418cb
6aa95fc
8e2d3f8
f738595
9d8c276
35aaa3d
76c3599
bb05b5f
b42b1e5
f23746c
6cec05d
d7b1e49
5670d56
ed24a0c
7304206
716d731
979632d
a73740e
98259ef
44b4b43
eed9a2c
dcd74f1
0e5e7da
7a7b7ff
09d208d
d90803b
2c951cc
6df728d
9e60845
7bc8f8a
2078260
2f8c3c6
fe0ecb0
162a415
53ab5fa
44a1ccf
48b2663
fcf9a66
7022d0d
9932d23
96c705b
6a56b89
f9560f9
6da8571
030b414
9808355
e31689a
229eb07
7840561
0797d69
5356715
fd6b0e5
71e5a13
5b9b9f6
2f130ed
31a406b
fa02d8b
326f362
77b3e84
f85e2de
d4ceff4
1398d6b
1a70095
518d46b
e39cd18
7c26e6f
9d0948e
aeddf35
50fe5ba
afda5da
ccf8e80
3e64d2d
1490e78
5decd6b
9f3f46e
3d79430
6234cd0
48f9663
16b0a3b
42053b0
16c9d6e
f64e7b6
93a677e
8c11e29
53f5698
1372508
0cbb79e
3b527ea
af04d58
1e06d32
21c189d
d172eaf
4ab6f09
590eddd
7817254
82a1bbd
7f33d79
07c45a0
2080b33
9de3554
c3d4641
4bbcaad
1ac7167
37306d8
3fba8ca
0ba763e
b62abc2
8a626b9
5c37e5c
4496494
5695d64
5f3a440
ae829a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -717,6 +717,29 @@ def default_kms_key= new_default_kms_key | |
| patch_gapi! :encryption | ||
| end | ||
|
|
||
| ## | ||
| # Restart resumable upload | ||
| # @param [String, ::File] file Path of the file on the filesystem to | ||
| # upload. Can be an File object, or File-like object such as StringIO. | ||
| # (If the object does not have path, a `path` argument must be also be | ||
| # provided.) | ||
| # @param [String] upload_id Unique Id of an resumable upload | ||
| # | ||
| # @example | ||
| # require "google/cloud/storage" | ||
| # | ||
| # storage = Google::Cloud::Storage.new | ||
| # | ||
| # bucket = storage.bucket "my-bucket" | ||
| # bucket.restart_resumable_upload file,upload_id | ||
|
|
||
| def restart_resumable_upload file, upload_id | ||
| ensure_service! | ||
| ensure_io_or_file_exists! file | ||
| raise "Upload Id missing" unless upload_id | ||
| service.restart_resumable_upload name, file, upload_id | ||
| end | ||
|
|
||
| ## | ||
| # The period of time (in seconds) that files in the bucket must be | ||
| # retained, and cannot be deleted, overwritten, or archived. | ||
|
|
@@ -1410,6 +1433,23 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil | |
| user_project: user_project | ||
| end | ||
|
|
||
| ## | ||
| # Delete resumable upload | ||
| # @param [String] upload_id Unique Id of an resumable upload | ||
| # | ||
| # @example | ||
| # require "google/cloud/storage" | ||
| # | ||
| # storage = Google::Cloud::Storage.new | ||
| # | ||
| # bucket = storage.bucket "my-bucket" | ||
| # bucket.delete_resumable_upload file,upload_id | ||
|
|
||
| def delete_resumable_upload upload_id | ||
| ensure_service! | ||
| raise "Upload Id missing" unless upload_id | ||
| service.delete_resumable_upload name, upload_id, options: { delete_upload: true } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just thought of this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hi @bajajneha27 I have created a new PR #30510 as this PR seemed to have some issue after merging main branch |
||
| end | ||
| ## | ||
| # Retrieves a list of files matching the criteria. | ||
| # | ||
|
|
@@ -1465,6 +1505,7 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil | |
| # puts file.name | ||
| # end | ||
| # | ||
|
|
||
| def files prefix: nil, delimiter: nil, token: nil, max: nil, | ||
| versions: nil, match_glob: nil, include_folders_as_prefixes: nil, | ||
| soft_deleted: nil | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.