UploadApi
class UploadApi
Class UploadApi for accessing Cloudinary Upload API functionality
Properties
ApiClient | $apiClient | Defined in UploadApi class | from UploadTrait |
Methods
Creates a new archive in the server and returns information in JSON format.
Creates a new archive in the server and returns information in JSON format.
Creates a new zip archive in the server and returns information in JSON format.
Creates a new zip archive in the server and returns information in JSON format.
Returns a URL that when invoked creates an archive and returns it.
Returns a URL that when invokes creates a zip archive and returns it.
Returns a URL that when invoked downloads the asset.
Creates and returns a URL that when invoked creates an archive of a folder.
The returned url allows downloading the backedup asset based on the the asset ID and the version ID.
Immediately and permanently deletes a single asset from your Cloudinary cloud.
Immediately and permanently deletes a single asset from your Cloudinary cloud.
Renames the specified asset in your Cloudinary cloud.
Renames the specified asset in your Cloudinary cloud.
Applies actions to an already uploaded asset.
Applies actions to already uploaded assets.
Populates metadata fields with the given values. Existing values will be overwritten.
Populates metadata fields with the given values.
Consolidates the upload parameters.
Uploads an asset to a Cloudinary cloud.
Uploads an asset to a Cloudinary cloud.
Uploads an asset to a Cloudinary cloud.
Uploads an asset to a Cloudinary cloud.
Admin Api constructor.
Gets upload URL for the specified asset type and endpoint.
Details
PromiseInterface
createArchiveAsync(array $options = [], string|null $targetFormat = null)
Creates a new archive in the server and returns information in JSON format.
ApiResponse
createArchive(array $options = [], $targetFormat = null)
Creates a new archive in the server and returns information in JSON format.
PromiseInterface
createZipAsync(array $options = [])
Creates a new zip archive in the server and returns information in JSON format.
ApiResponse
createZip(array $options = [])
Creates a new zip archive in the server and returns information in JSON format.
string
downloadArchiveUrl(array $options = [])
Returns a URL that when invoked creates an archive and returns it.
string
downloadZipUrl(array $options = [])
Returns a URL that when invokes creates a zip archive and returns it.
string
privateDownloadUrl(string $publicId, string $format, array $options = [])
Returns a URL that when invoked downloads the asset.
string
downloadFolder(string $folderPath, array $options = [])
Creates and returns a URL that when invoked creates an archive of a folder.
string
downloadBackedupAsset(string $assetId, string $versionId)
The returned url allows downloading the backedup asset based on the the asset ID and the version ID.
PromiseInterface
destroyAsync(string $publicId, array $options = [])
Immediately and permanently deletes a single asset from your Cloudinary cloud.
Backed up assets are not deleted, and any assets and transformed assets already downloaded by visitors to your
website might still be accessible through cached copies on the CDN. You can invalidate any cached copies on the
CDN with the invalidate
parameter.
This is an asynchronous function.
ApiResponse
destroy(string $publicId, array $options = [])
Immediately and permanently deletes a single asset from your Cloudinary cloud.
Backed up assets are not deleted, and any assets and transformed assets already downloaded by visitors to your
website might still be accessible through cached copies on the CDN. You can invalidate any cached copies on the
CDN with the invalidate
parameter.
PromiseInterface
renameAsync(string $fromPublicId, string $toPublicId, array $options = [])
Renames the specified asset in your Cloudinary cloud.
The existing URLs of renamed assets and their associated derived assets are no longer valid, although any
assets and transformed assets already downloaded by visitors to your website might still be accessible through
cached copies on the CDN. You can invalidate any cached copies on the CDN with the invalidate
parameter.
This is an asynchronous function.
mixed
rename(string $fromPublicId, string $toPublicId, array $options = [])
Renames the specified asset in your Cloudinary cloud.
The existing URLs of renamed assets and their associated derived assets are no longer valid, although any
assets and transformed assets already downloaded by visitors to your website might still be accessible through
cached copies on the CDN. You can invalidate any cached copies on the CDN with the invalidate
parameter.
PromiseInterface
explicitAsync(string $publicId, array $options = [])
Applies actions to an already uploaded asset.
This is an asynchronous function.
mixed
explicit(string $publicId, array $options = [])
Applies actions to already uploaded assets.
PromiseInterface
updateMetadataAsync(array $metadata, array $publicIds, array $options)
Populates metadata fields with the given values. Existing values will be overwritten.
Any metadata-value pairs given are merged with any existing metadata-value pairs (an empty value for an existing metadata field clears the value).
This is an asynchronous function.
mixed
updateMetadata(array $metadata, array $publicIds, array $options = [])
Populates metadata fields with the given values.
Existing values will be overwritten.
Any metadata-value pairs given are merged with any existing metadata-value pairs (an empty value for an existing metadata field clears the value).
static array
buildUploadParams(array $options)
Consolidates the upload parameters.
PromiseInterface
uploadAsync(mixed $file, array $options = [])
Uploads an asset to a Cloudinary cloud.
The asset can be: * a local file path * the actual data (byte array buffer) * the Data URI (Base64 encoded), max ~60 MB (62,910,000 chars) * the remote FTP, HTTP or HTTPS URL address of an existing file * a private storage bucket (S3 or Google Storage) URL of a whitelisted bucket
This is an asynchronous function.
ApiResponse
upload(mixed $file, array $options = [])
Uploads an asset to a Cloudinary cloud.
The asset can be: * a local file path * the actual data (byte array buffer) * the Data URI (Base64 encoded), max ~60 MB (62,910,000 chars) * the remote FTP, HTTP or HTTPS URL address of an existing file * a private storage bucket (S3 or Google Storage) URL of a whitelisted bucket
PromiseInterface
unsignedUploadAsync(string $file, string $uploadPreset, array $options = [])
Uploads an asset to a Cloudinary cloud.
The upload is not signed so an upload preset is required.
This is an asynchronous function.
ApiResponse
unsignedUpload(string $file, string $uploadPreset, array $options = [])
Uploads an asset to a Cloudinary cloud.
The upload is not signed so an upload preset is required.
__construct(mixed $configuration = null)
Admin Api constructor.
string
getUploadUrl(string|null $assetType = AssetType::AUTO, string $endPoint = UploadEndPoint::UPLOAD, array $params = [])
Gets upload URL for the specified asset type and endpoint.
Constants
MODE_DOWNLOAD |
|