The hash of the data is computed while uploading, and
if the resulting object has a different hash, an attempt is made to delete the object.
Whether the deletion fails or not, an UploadValidationException
is thrown. If the deletion fails, that failure can be examined via
AdditionalFailures
None
The upload is not validated.
ThrowOnly
The hash of the data is computed while uploading, and
if the resulting object has a different hash, an UploadValidationException
is thrown, but the object remains present in Storage.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[[["This page details the `UploadValidationMode` enum within the `Google.Cloud.Storage.V1` namespace, covering versions from 3.4.0 to the latest 4.11.0."],["The `UploadValidationMode` enum defines the validation behavior during data uploads to Google Cloud Storage."],["There are three distinct validation modes: `None`, `ThrowOnly`, and `DeleteAndThrow`, each dictating how the system responds to hash mismatches between uploaded data and the resulting object."],["`DeleteAndThrow` attempts to delete the object if a hash mismatch occurs and always throws an `UploadValidationException`, while `ThrowOnly` just throws an exception, and `None` bypasses validation."],["The `DeleteAndThrow` mode provides detailed failure information through the `AdditionalFailures` property of the `UploadValidationException` if the deletion fails."]]],[]]