Commit 02df9af
committed
refactor(Storage): Introduce RejectAndThrow upload validation mode and deprecate legacy modes
Introduces `UploadValidationMode.RejectAndThrow` to leverage server-side
validation, ensuring invalid uploads are rejected automatically before object creation.
Updates `UploadObjectOptions` to use this new mode as the default behavior.
Updates `UploadObjectTest`.
Deprecated the legacy `ThrowOnly` and `DeleteAndThrow` modes, as server-side
validation effectively unifies their end-state behaviors.
BREAKING CHANGE: The default upload validation mode has been switched to
`RejectAndThrow`. Under this mode, objects with mismatched hashes will no longer
be created in the bucket at all, changing the legacy `ThrowOnly` behavior which used to leave the invalid object intact.1 parent 2809a94 commit 02df9af
3 files changed
Lines changed: 17 additions & 40 deletions
File tree
- apis/Google.Cloud.Storage.V1
- Google.Cloud.Storage.V1.IntegrationTests
- Google.Cloud.Storage.V1
Lines changed: 4 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | 316 | | |
333 | 317 | | |
334 | 318 | | |
| |||
346 | 330 | | |
347 | 331 | | |
348 | 332 | | |
349 | | - | |
| 333 | + | |
350 | 334 | | |
351 | 335 | | |
352 | 336 | | |
353 | 337 | | |
354 | 338 | | |
355 | 339 | | |
356 | 340 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 341 | + | |
373 | 342 | | |
374 | 343 | | |
375 | | - | |
376 | | - | |
377 | 344 | | |
378 | 345 | | |
379 | 346 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
0 commit comments