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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis page details the \u003ccode\u003eUploadValidationMode\u003c/code\u003e enum within the \u003ccode\u003eGoogle.Cloud.Storage.V1\u003c/code\u003e namespace, outlining different validation options for data uploads in Google Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version covered on this page is 4.11.0, while the content is specific to version 3.4.0, with links available for versions ranging from 3.4.0 to 4.11.0.\u003c/p\u003e\n"],["\u003cp\u003eThree validation behaviors are defined: \u003ccode\u003eDeleteAndThrow\u003c/code\u003e, which attempts to delete a mismatched object and throws an exception; \u003ccode\u003eNone\u003c/code\u003e, which skips validation; and \u003ccode\u003eThrowOnly\u003c/code\u003e, which only throws an exception without deleting the mismatched object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUploadValidationException\u003c/code\u003e can be thrown by two of the enum values, \u003ccode\u003eDeleteAndThrow\u003c/code\u003e and \u003ccode\u003eThrowOnly\u003c/code\u003e, and further information about the exception can be found at the appropriate link.\u003c/p\u003e\n"]]],[],null,[]]