authenticationEndpoint
endpoint on your backend server as shown here.binary
- You can send the content of the file as binary. This is used when a file is being uploaded from the browser.base64
- Base64 encoded string of file content.url
- URL of the file from where to download the content before uploading. For example - https://www.example.com/rest-of-the-image-path.jpg
.400
error response is returned. In addition to this, the file download request is aborted if response headers are not received in 8 seconds. This will also result in a 400
error.token+expire
using your ImageKit.io private API key as a key. Learn how to create a signature below on the page. This should be in lowercase.
a-z
, A-Z
, 0-9
(including unicode letters, marks, and numerals in other languages)
- Special Characters: .
and -
true
or false
.true
, ImageKit.io will add a unique suffix to the filename parameter to get a unique filename.false
, then the image is uploaded with the provided filename parameter, and any existing file with the same name is replaced.true
tag1,tag2,tag3
. For example - t-shirt,round-neck,men
%
is not allowed./images/folder/
) in which the image has to be uploaded. If the folder(s) didn't exist before, a new folder(s) is created.
a-z
, A-Z
, 0-9
(including unicode letters, marks, and numerals in other languages)
- Special Characters: /
_
and -
- Using multiple /
creates a nested folder.
true
or false
.true
, the file is marked as private which restricts access to the original image URL and unnamed image transformations without signed URLs. Without the signed URL, only named transformations work on private imagesfalse
x,y,width,height
. For example - 10,10,100,100
fo-custom
transformation.tags,customCoordinates,isPrivateFile
to get the value of tags
, customCoordinates
, and isPrivateFile
in the response. Accepts combination of tags
, customCoordinates
, isPrivateFile
, embeddedMetadata
, and customMetadata
.true
. If overwriteFile
is set to false
and useUniqueFileName
is also false
, and a file already exists at the exact location, upload API will return an error immediately.true
. If set to true
and a file already exists at the exact location, its AITags
will be removed. Set overwriteAITags
to false
to preserve AITags
.true
. If the request does not have tags
, overwriteTags
is set to true
and a file already exists at the exact location, exiting tags
will be removed. In case the request body has tags
, setting overwriteTags
to false
has no effect and request's tags
are set on the asset.true
. If the request does not have customMetadata
, overwriteCustomMetadata
is set to true
and a file already exists at the exact location, exiting customMetadata
will be removed. In case the request body has customMetadata
, setting overwriteCustomMetadata
to false
has no effect and request's customMetadata
is set on the asset.overwriteCustomMetadata
parameter to understand default behaviour. Before setting any custom metadata on an asset you have to create the field using custom metadata fields API.200
status code with uploaded file details in a JSON-encoded response body.fileId
. Store this fileld
in your database, as this will be used to perform update action on this filefile
or folder
.null
.AITags
associated with the image. If no AITags
are set, it will be null
. These tags can be added using the google-auto-tagging
or aws-auto-tagging
extensions.id
(versionId) and name
.true
or false
.x,y,width,height
. If customCoordinates are not defined, then it is null
.
image
or non-image
.image/jpeg
responseField
in API request to get customMetadata
in the upload API response. Before setting any custom metadata on an asset, you have to create the field using custom metadata fields API.exif
, iptc
, and xmp
data. Use responseField
in API request to get embeddedMetadata
in the upload API response.YYYY-MM-DDTHH:mm:ss.sssZ
signature
is a string sent along with your upload request for authentication when using upload API from the client-side. Generating it requires your ImageKit.io private API key, and hence this should be generated on your backend. Your backend should ideally implement an API that should provide signature
.signature
is HMAC-SHA1 digest of the string token+expire
using your ImageKit.io private API key as a key. The signature
should be in lowercase.authenticationEndpoint
endpoint for getting authentication parameters required in the upload API.authenticationEndpoint
parameter during initialization. The SDK makes an HTTP GET request to this endpoint and expects a JSON response with three fields i.e. signature
, token
and expire
.authenticationEndpoint
endpoint on your server as shown here before using the below examples.