Cloudinary / Upload Media Asset
appKey:
cloudinary
actionKey:
upload-media-asset
Action Inputs
The following parameters are available when configuring this action:
file
File
The file to upload. It can be:
* a local file path
* the actual data (byte array buffer).
For example, this could be an IO input stream of the data (e.g., File.open(file, "rb")).
* 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
For details and examples, see: [file source options](https://cloudinary.com/documentation/upload_images#file_source_options).
string
useFilename
Use Filename
Whether to use the original file name of the uploaded asset. Relevant only if the `public_id` parameter isn't set.
When false and the `public_id` parameter is also not defined, the Public ID will be comprised of random characters.
When true and the `public_id` parameter is not defined, the uploaded file's original filename becomes the Public ID. Random characters are appended to the filename value to ensure Public ID uniqueness if `unique_filename` is true.
Default: `false`.
boolean
accessControl
Access Control
An array of access types for the asset. The asset is accessible as long as one of the access types is valid.
Possible values for each access type:
- `token` requires either [Token-based authentication](https://cloudinary.com/documentation/control_access_to_media#token_based_authentication_premium_feature) or [Cookie-based authentication](https://cloudinary.com/documentation/control_access_to_media#cookie_based_authentication_premium_feature) for accessing the asset.
For example: `access_type: "token"`
- `anonymous` allows public access to the asset. The anonymous access type can optionally include `start` and/or `end` dates (in ISO 8601 format) that define when the asset is publically available. Note that you can only include a single 'anonymous' access type. For example:
`access_type: "anonymous", start: "2017-12-15T12:00Z", end: "2018-01-20T12:00Z"`
boolean | undefined
accessibilityAnalysis
Accessibility Analysis
Currently available only to paid customers [requesting to take part](https://support.cloudinary.com/hc/en-us/requests/new) in the [accessibility analysis](https://cloudinary.com/documentation/analysis_on_upload#accessibility_analysis) Beta trial. Set to `true` to return accessibility analysis values for the image and to enable the `colorblind_accessibility_score` field to be used in the Search API.
Default: `false`. Relevant for images only.
boolean | undefined
accessMode
Access Mode
Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the [Admin API](https://cloudinary.com/documentation/admin_api#update_access_mode), without having to update any delivery URLs. Valid values: `public`, and `authenticated`. Default: `public`.
string | undefined
allowedFormats
Allowed Formats
Array<string> | undefined
async
Async
Whether to perform the request in the background (asynchronously). Default: `false`.
boolean | undefined
autoTagging
Auto Tagging
Whether to assign tags to an asset according to detected scene categories with a confidence score higher than the given value (between 0.0 and 1.0). See the [Google Automatic Video Tagging](https://cloudinary.com/documentation/google_automatic_video_tagging_addon), [Google Auto Tagging](https://cloudinary.com/documentation/google_auto_tagging_addon), [Imagga Auto Tagging](https://cloudinary.com/documentation/imagga_auto_tagging_addon), [Amazon Rekognition Auto Tagging](https://cloudinary.com/documentation/aws_rekognition_auto_tagging_addon), and [Amazon Rekognition Celebrity Detection](https://cloudinary.com/documentation/aws_rekognition_celebrity_and_face_detection_addon) add-ons for more details.
boolean | undefined
backgroundRemoval
Background Removal
Automatically remove the background of an image using an add-on.
Set to `cloudinary_ai` to use the deep-learning based [Cloudinary AI Background Removal](https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon) add-on.
Set to `pixelz` to use the human-powered [Pizelz Remove-The-Background Editing](https://cloudinary.com/documentation/remove_the_background_image_editing_addon) add-on service.
Relevant for images only.
string | undefined
backup
Backup
Tell Cloudinary whether to [back up](https://cloudinary.com/documentation/backups_and_version_management) the uploaded asset. Overrides the default backup settings of your account.
boolean | undefined
categorization
Categorization
A comma-separated list of the categorization add-ons to run on the asset. Set to `google_tagging`, `google_video_tagging`, `imagga_tagging` and/or `aws_rek_tagging` to automatically classify the scenes of the uploaded asset. See the [Google Automatic Video Tagging](https://cloudinary.com/documentation/google_automatic_video_tagging_addon), [Google Auto Tagging](https://cloudinary.com/documentation/google_auto_tagging_addon), [Imagga Auto Tagging](https://cloudinary.com/documentation/imagga_auto_tagging_addon), and [Amazon Rekognition Auto Tagging](https://cloudinary.com/documentation/aws_rekognition_auto_tagging_addon) add-ons for more details.
string | undefined
cinemagraphAnalysis
Cinemagraph Analysis
Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is **not** a cinemagraph and 1 means the asset **is** a cinemagraph. Default: `false`. Relevant for animated images and video only. A static image will return 0.
boolean | undefined
colors
Colors
Whether to retrieve predominant colors & color histogram of the uploaded image.
**Note:** If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned.
Default: `false`. Relevant for images only.
boolean | undefined
context
Context
Record<string, string | Array<string> | boolean> | undefined
customCoordinates
Custom Coordinates
Sets the coordinates of a single region contained in an uploaded image that is subsequently used for cropping uploaded images using the `custom` gravity mode. The region is specified by the X & Y coordinates of the top left corner and the width & height of the region, as an array. For example: `85,120,220,310.`
Relevant for images only.
string | undefined
detection
Detection
Set to `adv_face` or `aws_rek_face` to extract an extensive list of face attributes from an image using the [Advanced Facial Attribute Detection](https://cloudinary.com/documentation/advanced_facial_attributes_detection_addon) or [Amazon Rekognition Celebrity Detection](https://cloudinary.com/documentation/aws_rekognition_celebrity_and_face_detection_addon) add-ons.
Relevant for images only.
string | undefined
discardOriginalFilename
Discard Original Filename
Whether to discard the name of the original uploaded file. Relevant when delivering assets as attachments (setting the `flag` transformation parameter to `attachment`). Default: `false`.
boolean | undefined
eager
Eager
Array<string> | undefined
eagerAsync
Eager Async
Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than online as part of the upload call. Default: `false`
boolean | undefined
eagerNotificationUrl
Eager Notification Url
An HTTP or HTTPS URL to send a notification to (a webhook) when the generation of eager transformations is completed.
string | undefined
eval
Eval
Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, context, metadata or eager transformations depending on specific criteria of the uploaded file. For more details see [Evaluating and modifying upload parameters](https://cloudinary.com/documentation/analysis_on_upload#evaluating_and_modifying_upload_parameters).
string | undefined
faceCoordinates
Face Coordinates
Sets the coordinates of faces contained in an uploaded image and overrides the automatically detected faces. Each face is specified by the X & Y coordinates of the top left corner and the width & height of the face. The coordinates for each face are given as an array.
Relevant for images only.
string | undefined
faces
Faces
Whether to return the coordinates of faces contained in an uploaded image (automatically detected or manually defined). Each face is specified by the X & Y coordinates of the top left corner and the width & height of the face. The coordinates for each face are returned as an array (using the SDKs), and individual faces are separated with a pipe (`?`). For example: `10,20,150,130?213,345,82,61`.
Default: `false`. Relevant for images only.
boolean | undefined
folder
Folder
An optional folder name where the uploaded asset will be stored. The public ID contains the full path of the uploaded asset, including the folder name.
string | undefined
format
Format
An optional format to convert the uploaded asset to before saving in the cloud. For example: `jpg`.
string | undefined
headers
Headers
An HTTP header or a list of headers lines for adding as response HTTP headers when delivering the asset to your users. Supported headers: `Link`, `Authorization`, `X-Robots-Tag`. For example: `X-Robots-Tag: noindex`.
string | undefined
imageMetadata
Image Metadata
Whether to return IPTC, XMP, and detailed Exif metadata of the uploaded asset in the response.
Default: `false`. Supported for images, video, and audio.
Returned metadata for images includes: `PixelsPerUnitX`, `PixelsPerUnitY`, `PixelUnits`, `Colorspace`, and `DPI`.
Returned metadata for audio and video includes: `audio_codec`, `audio_bit_rate`, `audio_frequency`, `channels`, `channel_layout`.
Additional metadata for video includes: `pix_format`, `codec`, `level`, `profile`, `video_bit_rate`, `dar`.
string | undefined
invalidate
Invalidate
Whether to invalidate CDN cached copies of a previously uploaded asset (and all transformed versions that share the same Public ID). Default: `false`.
It usually takes between a few seconds and a few minutes for the invalidation to fully propagate through the CDN. There are also a number of other [important considerations](https://cloudinary.com/documentation/managing_assets#invalidating_cached_media_assets_on_the_cdn) when using the invalidate functionality.
boolean | undefined
moderation
Moderation
Specify the type of automated moderation that Cloudinary should apply to the uploaded media asset
string | undefined
ocr
Ocr
Set to `adv_ocr` to extract all text elements in an image as well as the bounding box coordinates of each detected element using the [OCR text detection and extraction add-on](https://cloudinary.com/documentation/ocr_text_detection_and_extraction_addon). Relevant for images only.
string | undefined
overwrite
Overwrite
Whether to overwrite existing assets with the same public ID. When set to false, return immediately if an asset with the same Public ID was found. Default: `true` (when using unsigned upload, the default is false and cannot be changed to true).
**Important**: Depending on the settings for your account, overwriting an asset may clear the tags, contextual, and structured metadata values for that asset. If you prefer these values to always be preserved on overwrite (unless other values are specifically set when uploading the new version), you can [submit a request](https://support.cloudinary.com/hc/en-us/requests/new) to change this behavior for your account.
boolean | undefined
phash
Phash
Whether to return the perceptual hash (pHash) on the uploaded image. The pHash acts as a fingerprint that allows checking image similarity.
Default: `false`. Relevant for images only.
boolean | undefined
publicId
Public Id
The identifier that is used for accessing the uploaded asset. The Public ID may contain a full path including folders separated by a slash (`/`).
If not specified, then the Public ID of the asset will either be comprised of random characters or will use the original file's filename, depending whether `use_filename` was set to true.
**Note**: The Public ID value for images and videos should not include a file extension. Include the file extension for `raw` files only.
string | undefined
qualityAnalysis
Quality Analysis
Whether to return a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus. Default: `false`. Relevant for images only.
Paid customers can [request to take part](https://support.cloudinary.com/hc/en-us/requests/new) in the extended quality analysis Beta trial. When activated, this parameter returns quality scores for various other factors in addition to `focus`, such as `jpeg_quality`, `noise`, `exposure`, `lighting` and `resolution`, together with an overall weighted `quality_score`. The `quality_score`, `color_quality_score` and `pixel_quality_score` fields can be used in the Search API.
boolean | undefined
rawConvert
Raw Convert
Asynchronously generates a related file based on the uploaded file.
* Set to `aspose` to automatically create a PDF or other image format from a `raw` Office document using the [Aspose Document Conversion](https://cloudinary.com/documentation/aspose_document_conversion_addon) add-on.
* Set to `google_speech` to instruct the [Google AI Video Transcription](https://cloudinary.com/documentation/google_ai_video_transcription_addon) add-on to generate an automatic transcript `raw` file from an uploaded video.
* Set to `extract_text` to extract all the text from a PDF file and store it in a raw file. The public ID of the generated `raw` file will be in the format: **[pdf_public_id].extract_text.json.**
See also: [Converting raw files](https://cloudinary.com/documentation/upload_images#converting_raw_files).
string | undefined
resourceType
Resource Type
Set the type of file you are uploading or use `auto` to automatically detect the file type. Valid values: `image`, `raw`, `video` and `auto`. Defaults: `image` for server-side uploading and `auto` for client-side uploading.
**Note**: Use the video resource type for all video assets as well as for audio files, such as `.mp3`.
string | undefined
responsiveBreakpoints
Responsive Breakpoints
Record<string, string | Array<string> | boolean> | undefined
transformation
Transformation
An incoming transformation to run on the uploaded asset before saving it in the cloud. T his parameter is given as a hash of transformation parameters (or an array of hashes for chained transformations).
string | undefined
type
Type
The delivery type. Allows uploading assets as `private` or `authenticated` instead of the default `upload` mode. Valid values: `upload`, `private` and `authenticated`. Default: `upload`.
string | undefined
uniqueFilename
Unique Filename
When set to false, does not add random characters at the end of the filename that guarantee its uniqueness. In this case, if the `overwrite` parameter is also false, the upload returns an error. This parameter is relevant only if `use_filename` is also set to true. Default: `true`.
boolean | undefined