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.
Adds context metadata as key-value pairs to the the specified assets.
Adds context metadata as key-value pairs to the the specified assets.
Removes all context metadata from the specified assets.
Removes all context metadata from the specified assets.
Creates a sprite from all images that have been assigned a specified tag or from a provided array of image URLs.
Creates a sprite from all images that have been assigned a specified tag or from a provided array of image URLs.
Generates an url to create a sprite from all images that have been assigned a specified tag or from a provided array of URLs.
Creates a single animated image, video or PDF from all image assets that have been assigned a specified tag or from a provided array of URLs.
Creates a single animated image, video or PDF from all image assets that have been assigned a specified tag or from a provided array of URLs.
Generates an url to create a single animated image, video or PDF from all image assets that have been assigned a specified tag or from a provided array of URLs.
Creates derived images for all of the individual pages in a multi-page file (PDF or animated GIF).
Creates derived images for all of the individual pages in a multi-page file (PDF or animated GIF).
Dynamically generates an image from a given textual string.
Dynamically generates an image from a given textual string.
Create auto-generated video slideshows.
Create auto-generated video slideshows.
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.
Adds a tag to the assets specified.
Adds a tag to the assets specified.
Removes a tag from the assets specified.
Removes a tag from the assets specified.
Removes all tags from the assets specified.
Removes all tags from the assets specified.
Replaces all existing tags on the assets specified with the tag specified.
Replaces all existing tags on the assets specified with the tag specified.
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 $targetFormat = null)
Creates a new archive in the server and returns information in JSON format.
ApiResponse
createArchive(array $options = [], null $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
addContextAsync(array|string $context, array|string $publicIds = [], array $options = [])
Adds context metadata as key-value pairs to the the specified assets.
This is an asynchronous function.
ApiResponse
addContext(array|string $context, array|string $publicIds = [], array $options = [])
Adds context metadata as key-value pairs to the the specified assets.
PromiseInterface
removeAllContextAsync(array|string $publicIds = [], array $options = [])
Removes all context metadata from the specified assets.
This is an asynchronous function.
ApiResponse
removeAllContext(array $publicIds = [], array $options = [])
Removes all context metadata from the specified assets.
PromiseInterface
generateSpriteAsync(string|array $tag, array $options = [])
Creates a sprite from all images that have been assigned a specified tag or from a provided array of image URLs.
The process produces two files: * A single sprite image file containing all the images. * A CSS file that includes the style class names and the location of the individual images in the sprite.
This is an asynchronous function.
ApiResponse
generateSprite(string|array $tag, array $options = [])
Creates a sprite from all images that have been assigned a specified tag or from a provided array of image URLs.
The process produces two files: * A single sprite image file containing all the images. * A CSS file that includes the style class names and the location of the individual images in the sprite.
string
downloadGeneratedSprite(string|array $tag, array $options = [])
Generates an url to create a sprite from all images that have been assigned a specified tag or from a provided array of URLs.
PromiseInterface
multiAsync(string|array $tag, array $options = [])
Creates a single animated image, video or PDF from all image assets that have been assigned a specified tag or from a provided array of URLs.
This is an asynchronous function.
ApiResponse
multi(string|array $tag, array $options = [])
Creates a single animated image, video or PDF from all image assets that have been assigned a specified tag or from a provided array of URLs.
string
downloadMulti(string|array $tag, array $options = [])
Generates an url to create a single animated image, video or PDF from all image assets that have been assigned a specified tag or from a provided array of URLs.
PromiseInterface
explodeAsync(string $publicId, array $options = [])
Creates derived images for all of the individual pages in a multi-page file (PDF or animated GIF).
Each derived image is stored with the same public ID as the original file, and can be accessed using the page parameter, in order to deliver a specific image.
This is an asynchronous function.
ApiResponse
explode(string $publicId, array $options = [])
Creates derived images for all of the individual pages in a multi-page file (PDF or animated GIF).
Each derived image is stored with the same public ID as the original file, and can be accessed using the page parameter, in order to deliver a specific image.
PromiseInterface
textAsync(string $text, array $options = [])
Dynamically generates an image from a given textual string.
This is an asynchronous function.
ApiResponse
text(string $text, array $options = [])
Dynamically generates an image from a given textual string.
PromiseInterface
createSlideshowAsync(array $options = [])
Create auto-generated video slideshows.
ApiResponse
createSlideshow(array $options = [])
Create auto-generated video slideshows.
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.
mixed
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).
PromiseInterface
addTagAsync(string $tag, array $publicIds = [], array $options = [])
Adds a tag to the assets specified.
This is an asynchronous function.
ApiResponse
addTag(string $tag, array $publicIds = [], array $options = [])
Adds a tag to the assets specified.
PromiseInterface
removeTagAsync(string $tag, array|string $publicIds = [], array $options = [])
Removes a tag from the assets specified.
This is an asynchronous function.
ApiResponse
removeTag(string $tag, array|string $publicIds = [], array $options = [])
Removes a tag from the assets specified.
PromiseInterface
removeAllTagsAsync(array $publicIds = [], array $options = [])
Removes all tags from the assets specified.
This is an asynchronous function.
ApiResponse
removeAllTags(array $publicIds = [], array $options = [])
Removes all tags from the assets specified.
PromiseInterface
replaceTagAsync(string $tag, array|string $publicIds = [], array $options = [])
Replaces all existing tags on the assets specified with the tag specified.
This is an asynchronous function.
ApiResponse
replaceTag(string $tag, array|string $publicIds = [], array $options = [])
Replaces all existing tags on the assets specified with the tag specified.
static array
buildUploadParams(array $options)
Consolidates the upload parameters.
PromiseInterface
uploadAsync(string $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(string $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 $assetType = AssetType::AUTO, string $endPoint = UploadEndPoint::UPLOAD, array $params = [])
Gets upload URL for the specified asset type and endpoint.
Constants
MODE_DOWNLOAD |
|