# Method: media.upload

- [HTTP request](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.request_body)
  - [JSON representation](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.response_body)
  - [JSON representation](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.UploadPolicyFileResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#body.aspect)
- [Try it!](https://developers.google.com/chrome/policy/reference/rest/v1/media/upload#try-it)

Creates an enterprise file from the content provided by user. Returns a public download url for end user.

### HTTP request

- Upload URI, for media upload requests:  
  `POST https://chromepolicy.googleapis.com/upload/v1/{customer=customers/*}/policies/files:uploadPolicyFile`
- Metadata URI, for metadata-only requests:  
  `POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/files:uploadPolicyFile`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `customer` | `string` Required. The customer for which the file upload will apply. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "policyField": string } ``` |

| Fields ||
|---|---|
| `policyField` | `string` Required. The fully qualified policy schema and field name this file is uploaded for. This information will be used to validate the content type of the file. |

### Response body

Response message for downloading an uploaded file.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "downloadUri": string } ``` |

| Fields ||
|---|---|
| `downloadUri` | `string` The uri for end user to download the file. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/chrome.management.policy`