Downloading a File
Function
Download files from the storage.
URI
GET Huawei Cloud Astro Zero domain name/u-route/baas/sys/v1.1/connectors/{connector_type}/{connector_name}/viewobject?object=X&x-image-process=Y
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
connector_type |
Yes |
String |
Explanation Type of a connector. Constraints None Value
Default value None |
connector_name |
Yes |
String |
Explanation Name of the connector instance, that is, the connector instance name set when the connector is created. Constraints None Value None Default value None |
object |
Yes |
String |
Explanation Full path of the file in the bucket, including the file name. Constraints None Value None Default value None |
x-image-process |
No |
String |
Explanation Defined in OBS to indicate the image processing service. Example:
Constraints None Value None Default value None |
Request Parameters
Header Field |
Mandatory |
Type |
Description |
---|---|---|---|
Range |
No |
String |
Explanation Specifies the range of file content to be viewed in the format bytes=numA-numB, where numA is the start byte position and numB is the end byte position. For example, if the value is bytes=0-, the file content of all bytes is returned. Constraints The values of numA and numB must be greater than 0, and numB must be greater than numA. Value None Default value If this parameter is not specified, all file content is returned. |
Response Parameters
Only the file content is returned.
Example Request
An OBS connector has been created. The connector instance name is Namespace __TestOBS. The 1.txt file exists in the a/b/c directory of the OBS bucket. Run the following request to download the 1.txt file:
GET https://Huawei Cloud Astro Zero domain name/u-route/baas/sys/v1.1/connectors/obs/Namespace __TestOBS/viewobject?object=a/b/c/1.txt
Example Response
The following file content is returned:
test
Status Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot