• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Glance
  5. Image Files
  6. Upload Image File

Upload Image File

Function Description

This interface is used to upload an image file.

Interface Format

Method

URI

Description

PUT

/v2/images/{image_id}/file

Uploads an image file.

You need to set Content Type carried in the header to application/octet-stream.

Restrictions

You can upload only an image file of less than 2 GB. This interface is not recommended.

Extension Description

N/A

Request Parameter

N/A

Response Parameter

N/A

Request Example

PUT

/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba86/file

Response Example

HTTP/1.1 204 No Content

Error Code

Error Code

Description

404

Not Found

This error occurs when the specified image does not exist.