Provide an expected final length of an uploaded object.
Resumable uploads allow or an additional integrity check - make GCS check if the uploaded content matches the declared length. If it doesn't the upload will fail.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe latest version available is 2.37.0-rc, with links provided for older versions dating back to 2.11.0, all related to the \u003ccode\u003egoogle::cloud::storage::UploadContentLength\u003c/code\u003e structure.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUploadContentLength\u003c/code\u003e structure allows for an integrity check during resumable uploads to ensure the uploaded content matches the declared length, and the upload fails if it does not.\u003c/p\u003e\n"],["\u003cp\u003eThe document pertains to information regarding \u003ccode\u003eUploadContentLength\u003c/code\u003e, which is a parameter that can be used to enforce the expected final length of an uploaded object.\u003c/p\u003e\n"],["\u003cp\u003eThe webpage's content also includes the \u003ccode\u003eheader_name()\u003c/code\u003e function, which is a static function that returns a value of \u003ccode\u003echar const *\u003c/code\u003e type.\u003c/p\u003e\n"]]],[],null,["# Struct UploadContentLength (2.42.0-rc)\n\nVersion latestkeyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/storage/latest/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.41.0](/cpp/docs/reference/storage/2.41.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.40.0](/cpp/docs/reference/storage/2.40.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.39.0](/cpp/docs/reference/storage/2.39.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.38.0](/cpp/docs/reference/storage/2.38.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.37.0](/cpp/docs/reference/storage/2.37.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.36.0](/cpp/docs/reference/storage/2.36.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.35.0](/cpp/docs/reference/storage/2.35.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.34.0](/cpp/docs/reference/storage/2.34.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.33.0](/cpp/docs/reference/storage/2.33.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.32.0](/cpp/docs/reference/storage/2.32.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.31.0](/cpp/docs/reference/storage/2.31.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.30.0](/cpp/docs/reference/storage/2.30.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.29.0](/cpp/docs/reference/storage/2.29.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.28.0](/cpp/docs/reference/storage/2.28.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.27.0](/cpp/docs/reference/storage/2.27.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.26.0](/cpp/docs/reference/storage/2.26.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.25.1](/cpp/docs/reference/storage/2.25.1/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.24.0](/cpp/docs/reference/storage/2.24.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.23.0](/cpp/docs/reference/storage/2.23.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.22.1](/cpp/docs/reference/storage/2.22.1/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.21.0](/cpp/docs/reference/storage/2.21.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.20.0](/cpp/docs/reference/storage/2.20.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.19.0](/cpp/docs/reference/storage/2.19.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.18.0](/cpp/docs/reference/storage/2.18.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.17.0](/cpp/docs/reference/storage/2.17.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.16.0](/cpp/docs/reference/storage/2.16.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.15.1](/cpp/docs/reference/storage/2.15.1/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.14.0](/cpp/docs/reference/storage/2.14.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.13.0](/cpp/docs/reference/storage/2.13.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.12.0](/cpp/docs/reference/storage/2.12.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength)\n- [2.11.0](/cpp/docs/reference/storage/2.11.0/structgoogle_1_1cloud_1_1storage_1_1UploadContentLength) \nProvide an expected final length of an uploaded object. \nResumable uploads allow or an additional integrity check - make GCS check if the uploaded content matches the declared length. If it doesn't the upload will fail.\n\nFunctions\n---------\n\n### static header_name()"]]