trait UploadMappingsTrait

Enables you to manage the upload mappings.

Learn more: Upload Mappings method - Admin API

Properties

ApiClient $apiClient Defined in AdminApi class

Methods

uploadMappings(array $options = [])

Lists upload mappings by folder and its mapped template (URL).

uploadMapping(string $name)

Returns the details of the specified upload mapping.

deleteUploadMapping(string $name)

Deletes an upload mapping.

updateUploadMapping(string $name, array $options = [])

Updates an existing upload mapping with a new template (URL).

createUploadMapping(string $name, array $options = [])

Creates a new upload mapping.

Details

ApiResponse uploadMappings(array $options = [])

Lists upload mappings by folder and its mapped template (URL).

Parameters

Name Type Description
$options array The optional parameters. See the Admin API documentation.

Return Value

ApiResponse

See also

https://cloudinary.com/documentation/admin_api#get_upload_mappings

ApiResponse uploadMapping(string $name)

Returns the details of the specified upload mapping.

Retrieve the mapped template (URL) of a specified upload mapping folder.

Parameters

Name Type Description
$name string The name of the upload mapping folder.

Return Value

ApiResponse

See also

https://cloudinary.com/documentation/admin_api#get_the_details_of_a_single_upload_mapping

ApiResponse deleteUploadMapping(string $name)

Deletes an upload mapping.

Parameters

Name Type Description
$name string The name of the upload mapping folder to delete.

Return Value

ApiResponse

Exceptions

ApiError

See also

https://cloudinary.com/documentation/admin_api#delete_an_upload_mapping

ApiResponse updateUploadMapping(string $name, array $options = [])

Updates an existing upload mapping with a new template (URL).

Parameters

Name Type Description
$name string The name of the upload mapping folder to remap.
$options array The optional parameters. See the Admin API documentation.

Return Value

ApiResponse

Exceptions

ApiError

See also

https://cloudinary.com/documentation/admin_api#update_an_upload_mapping

ApiResponse createUploadMapping(string $name, array $options = [])

Creates a new upload mapping.

Parameters

Name Type Description
$name string The name of the folder to map.
$options array The optional parameters. See the Admin API documentation.

Return Value

ApiResponse

See also

https://cloudinary.com/documentation/admin_api#create_an_upload_mapping