Method: sites.versions.populateFiles Stay organized with collections Save and categorize content based on your preferences.
Adds content files to the specified version.
Each file must be under 2 GB.
HTTP request
POST https://firebasehosting.googleapis.com/v1beta1/{parent=sites/*/versions/*}:populateFiles
The URL usesgRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The version to which to add files, in the format:
|
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{"files":{string:string,...}} |
| Fields | |
|---|---|
files |
A set of file paths to the hashes corresponding to assets that should be added to the version. A file path to an empty hash will remove the path from the version. Calculate a hash by Gzipping the file then taking the SHA256 hash of the newly compressed file. An object containing a list of |
Response body
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{"uploadRequiredHashes":[string],"uploadUrl":string} |
| Fields | |
|---|---|
uploadRequiredHashes[] |
The content hashes of the specified files that need to be uploaded to the specified URL. |
uploadUrl |
The URL to which the files should be uploaded, in the format:
Perform a multipart |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/firebase.hostinghttps://www.googleapis.com/auth/firebasehttps://www.googleapis.com/auth/cloud-platform
For more information, see theAuthentication Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-09-11 UTC.