POST/ng-cms/media/{projectId}

Upload a media asset

Параметры запроса

projectIdstring
Обязательный

The unique identifier of the project (bucket)

filefile
Обязательный

The file to upload. Maximum size is 10 MB. Must be sent as multipart/form-data.

titlestring
Необязательный

Human-readable title for the asset. Defaults to the filename (without extension) if omitted.

descriptionstring
Необязательный

Optional description of the media asset.

Ответы

201File uploaded and media asset created successfully. Returns the new asset ID.

тип: ApiResponse<string>

successbooleanIndicates whether the request was successful
resultstringThe ID of the newly created media asset
errorsErrorDetail[]List of errors (empty on success)
400Bad Request. No file was provided or the file is empty.
401Unauthorized. A valid bearer token is required.
412Precondition Failed. The project's current plan does not allow access to this resource, or payment is required to proceed.
500Unexpected server error.

тип: ApiResponse<T>

successbooleanAlways false
errorsErrorDetail[]List of server-side errors
correlationIdstringUnique ID for tracing the error
messagestringError message
stackstringStack trace (non-production only)

Оставаясь на сайте, Вы даете свое согласие на использование файлов cookie