-
Notifications
You must be signed in to change notification settings - Fork 569
feat(storage): setting default checksum #32411
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 2 commits
5b77777
6889e07
25958da
40173cb
cdf188c
f337d88
0cae977
aa24c34
a6891df
64b8685
65147e1
2b85534
502cdc9
2f1f2f8
ff4a2ef
3985d4a
f64a3d4
4375cbc
00ea0ed
f6ac07d
7f512e5
49a0bf6
9bc4669
95c4e2b
902c131
15530ac
e76e273
b9ce277
d6f0a90
3566bc5
5be6d8f
7793295
d672c7a
2a9f74f
ce6c187
0866a0d
7d84f7e
6ab9eff
b6984d1
2566ebc
0d71cd2
11796b0
c6dcba4
530be64
cfac62c
2f6b171
387c465
3d853ea
1db8556
b28b7bf
057f524
eb8598c
104fff4
266382d
a45d82e
06f5821
7cacc23
c7b6248
95295a9
4826f4a
0b87655
3839f73
79af1b8
0e6393c
759ca2f
a794dac
a6eab53
89cf347
ca0072c
a031b4c
2c96cf4
83f028f
8b02558
f75263c
4338bce
892d957
f323a3e
b3b52b1
f648eb9
9ae6111
c81fd9b
df57656
a1f6b5e
a5aab63
369b237
9900c02
ae4dc52
3e80e60
7661f75
8faf8f5
e1b9208
e44b51a
3d0efff
4b86a07
bcd4e94
e3ad986
70f61b5
733dba5
80dd5a7
2b2c6d2
23004e2
3b17316
9a327f3
027ff9e
4b9463b
133601c
220bc46
d3ad67f
fe2074d
6235739
7459515
9368314
ba9225c
c323fa6
e1aa712
6e7bdce
ccb0068
e0f135b
c5d0879
fef236e
e7d7218
6701f58
0ad65ff
c4ed8c0
84acd80
427683d
79d2b91
cf8952f
df3b7d9
f0e2f99
cd145e4
8f14f02
d0bd620
b70e0d8
159f1c6
fd87620
1b2c1d5
5a2a3cc
38be7fe
73ed4a0
a048a71
95ced1c
97ccbc5
1d2aaac
c1191ee
3075559
49143cf
9a1a350
b3e37ef
25df984
2033ca3
a3bfd94
0fad58f
984ca35
ec8249d
afe2e36
6472ec9
7016aba
9e75575
1d80dd7
cd41256
636ed3b
3bc873a
343e403
35dc7e6
278a254
944fe52
2a397a7
8d0ffac
1f0fca1
59b2cbd
9f5db4d
e631cfd
e637df5
f9bda64
04a2ce6
5111334
ebe27b3
ccb1eb7
9d1690d
dda5b12
a8fc600
6fd6762
9779f58
fa220ea
e9aaa08
c9f3d33
4b56d76
cf4788e
bbe0a38
25741b3
7bcbd1e
096a8da
0e0f83d
712e40b
af2c0ef
6f01846
c72d257
7d30b0f
63c7cc7
ca6e431
dfe6ff2
198357b
e2fe3c5
e7cfe7b
a949fe6
9b3fce1
df81ada
03022f9
5859fd6
76f536a
ba99884
b1e954e
07e09e7
37124a8
bd68cce
795e560
0e6aff4
9f816ef
c5f2cc3
8fdec19
571014b
3d24881
dd7654d
c31fed4
fa43307
75b6aec
7feeb7c
888028b
2eb8fe5
7342ee5
7210477
5364130
8e98d4c
1febd36
2a871c3
fc1de35
f0fea09
7040c6c
8e475d5
ff7c8ca
609c3f0
0d42a74
dfcda06
7618c0f
8f90e65
4c22b2b
1c92295
2504faa
ef12ded
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 |
|---|---|---|
|
|
@@ -612,4 +612,13 @@ def restore_file_gapi bucket, file_name, generation=nil | |
| file_hash = random_file_hash(bucket, file_name, generation).to_json | ||
| Google::Apis::StorageV1::Object.from_json file_hash | ||
| end | ||
|
|
||
| def set_crc32c_as_default md5, crc32c, checksum | ||
| # If no checksum type or specific value is provided, the default will be set to crc32c. | ||
| # If the checksum is set to false, it will be disabled. | ||
| if [checksum, crc32c, md5].all?(&:nil?) || checksum == true | ||
| crc32c = Google::Cloud::Storage::File::Verifier.crc32c_for(StringIO.new("Hello world")) | ||
|
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. Should the string "Hello world" also be passed as a parameter for robustness?
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. changed this method to receive content |
||
| end | ||
| crc32c | ||
| end | ||
| end | ||
Uh oh!
There was an error while loading. Please reload this page.