[[["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-06-13 UTC."],[[["\u003cp\u003eThis API facilitates the direct upload of a file to a specified repository, with the process completion indicated by a returned Operation.\u003c/p\u003e\n"],["\u003cp\u003eThe upload requires a designated \u003ccode\u003eparent\u003c/code\u003e parameter, representing the repository's resource name, and necessitates the \u003ccode\u003eartifactregistry.files.upload\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe request body optionally takes a \u003ccode\u003efileId\u003c/code\u003e; if omitted, the sha256 digest of the file content is used as the default identifier.\u003c/p\u003e\n"],["\u003cp\u003eA successful upload returns an \u003ccode\u003eoperation\u003c/code\u003e object, which can be used to track the status of the file upload.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this action requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.repositories.files.upload\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.UploadFileMediaResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nDirectly uploads a file to a repository. The returned Operation will complete once the resources are uploaded.\n\n### HTTP request\n\nChoose a location: \nglobal europe-west3 europe-west8 europe-west9 us-central1 us-east1 us-east4 us-east5 us-south1 us-west1 us-west2 us-west3 us-west4 me-central2 us eu \n\n\u003cbr /\u003e\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nThe response to upload a generic artifact.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]