Class FileUploadParams.Builder
-
- All Implemented Interfaces:
public final class FileUploadParams.BuilderA builder for FileUploadParams.
-
-
Method Summary
Modifier and Type Method Description final FileUploadParams.Builderbody(FileUploadParams.Body body)Sets the entire request body. final FileUploadParams.Builderfile(InputStream file)The API accepts any of the following: Binary data – send the raw bytes as
multipart/form-data.HTTP / HTTPS URL – a publicly reachable URL that ImageKit’s servers can fetch.
Base64 string – the file encoded as a Base64 data URI or plain Base64.
final FileUploadParams.Builderfile(MultipartField<InputStream> file)Sets Builder.file to an arbitrary multipart value. final FileUploadParams.Builderfile(ByteArray file)The API accepts any of the following: Binary data – send the raw bytes as
multipart/form-data.HTTP / HTTPS URL – a publicly reachable URL that ImageKit’s servers can fetch.
Base64 string – the file encoded as a Base64 data URI or plain Base64.
final FileUploadParams.Builderfile(Path path)The API accepts any of the following: Binary data – send the raw bytes as
multipart/form-data.HTTP / HTTPS URL – a publicly reachable URL that ImageKit’s servers can fetch.
Base64 string – the file encoded as a Base64 data URI or plain Base64.
final FileUploadParams.BuilderfileName(String fileName)The name with which the file has to be uploaded. final FileUploadParams.BuilderfileName(MultipartField<String> fileName)Sets Builder.fileName to an arbitrary multipart value. final FileUploadParams.Buildertoken(String token)A unique value that the ImageKit.io server will use to recognize and prevent subsequent retries for the same request. final FileUploadParams.Buildertoken(MultipartField<String> token)Sets Builder.token to an arbitrary multipart value. final FileUploadParams.Builderchecks(String checks)Server-side checks to run on the asset. final FileUploadParams.Builderchecks(MultipartField<String> checks)Sets Builder.checks to an arbitrary multipart value. final FileUploadParams.BuildercustomCoordinates(String customCoordinates)Define an important area in the image. final FileUploadParams.BuildercustomCoordinates(MultipartField<String> customCoordinates)Sets Builder.customCoordinates to an arbitrary multipart value. final FileUploadParams.BuildercustomMetadata(FileUploadParams.CustomMetadata customMetadata)JSON key-value pairs to associate with the asset. final FileUploadParams.BuildercustomMetadata(MultipartField<FileUploadParams.CustomMetadata> customMetadata)Sets Builder.customMetadata to an arbitrary multipart value. final FileUploadParams.Builderdescription(String description)Optional text to describe the contents of the file. final FileUploadParams.Builderdescription(MultipartField<String> description)Sets Builder.description to an arbitrary multipart value. final FileUploadParams.Builderexpire(Long expire)The time until your signature is valid. final FileUploadParams.Builderexpire(MultipartField<Long> expire)Sets Builder.expire to an arbitrary multipart value. final FileUploadParams.Builderextensions(List<ExtensionItem> extensions)Array of extensions to be applied to the asset. final FileUploadParams.Builderextensions(MultipartField<List<ExtensionItem>> extensions)Sets Builder.extensions to an arbitrary multipart value. final FileUploadParams.BuilderaddExtension(ExtensionItem extension)Adds a single ExtensionItem to extensions. final FileUploadParams.BuilderaddExtension(ExtensionItem.RemoveBg removeBg)Alias for calling addExtension with ExtensionItem.ofRemoveBg(removeBg).final FileUploadParams.BuilderaddExtension(ExtensionItem.AutoTaggingExtension autoTaggingExtension)Alias for calling addExtension with ExtensionItem.ofAutoTaggingExtension(autoTaggingExtension).final FileUploadParams.BuilderaddExtension(ExtensionItem.AiTasks aiTasks)Alias for calling addExtension with ExtensionItem.ofAiTasks(aiTasks).final FileUploadParams.BuilderaddExtension(ExtensionItem.SavedExtension savedExtension)Alias for calling addExtension with ExtensionItem.ofSavedExtension(savedExtension).final FileUploadParams.BuilderaddExtensionAiAutoDescription()Alias for calling addExtension with ExtensionItem.ofAiAutoDescription().final FileUploadParams.BuilderaddAiTasksExtension(List<ExtensionItem.AiTasks.Task> tasks)Alias for calling addExtension with the following: ExtensionItem.AiTasks.builder() .tasks(tasks) .build()final FileUploadParams.BuilderaddSavedExtensionExtension(String id)Alias for calling addExtension with the following: ExtensionItem.SavedExtension.builder() .id(id) .build()final FileUploadParams.Builderfolder(String folder)The folder path in which the image has to be uploaded. final FileUploadParams.Builderfolder(MultipartField<String> folder)Sets Builder.folder to an arbitrary multipart value. final FileUploadParams.BuilderisPrivateFile(Boolean isPrivateFile)Whether to mark the file as private or not. final FileUploadParams.BuilderisPrivateFile(MultipartField<Boolean> isPrivateFile)Sets Builder.isPrivateFile to an arbitrary multipart value. final FileUploadParams.BuilderisPublished(Boolean isPublished)Whether to upload file as published or not. final FileUploadParams.BuilderisPublished(MultipartField<Boolean> isPublished)Sets Builder.isPublished to an arbitrary multipart value. final FileUploadParams.BuilderoverwriteAiTags(Boolean overwriteAiTags)If set to trueand a file already exists at the exact location, its AITags will be removed.final FileUploadParams.BuilderoverwriteAiTags(MultipartField<Boolean> overwriteAiTags)Sets Builder.overwriteAiTags to an arbitrary multipart value. final FileUploadParams.BuilderoverwriteCustomMetadata(Boolean overwriteCustomMetadata)If the request does not have customMetadata, and a file already exists at the exact location, existing customMetadata will be removed.final FileUploadParams.BuilderoverwriteCustomMetadata(MultipartField<Boolean> overwriteCustomMetadata)Sets Builder.overwriteCustomMetadata to an arbitrary multipart value. final FileUploadParams.BuilderoverwriteFile(Boolean overwriteFile)If falseanduseUniqueFileNameis alsofalse, and a file already exists at the exact location, upload API will return an error immediately.final FileUploadParams.BuilderoverwriteFile(MultipartField<Boolean> overwriteFile)Sets Builder.overwriteFile to an arbitrary multipart value. final FileUploadParams.BuilderoverwriteTags(Boolean overwriteTags)If the request does not have tags, and a file already exists at the exact location, existing tags will be removed.final FileUploadParams.BuilderoverwriteTags(MultipartField<Boolean> overwriteTags)Sets Builder.overwriteTags to an arbitrary multipart value. final FileUploadParams.BuilderpublicKey(String publicKey)Your ImageKit.io public key. final FileUploadParams.BuilderpublicKey(MultipartField<String> publicKey)Sets Builder.publicKey to an arbitrary multipart value. final FileUploadParams.BuilderresponseFields(List<FileUploadParams.ResponseField> responseFields)Array of response field keys to include in the API response body. final FileUploadParams.BuilderresponseFields(MultipartField<List<FileUploadParams.ResponseField>> responseFields)Sets Builder.responseFields to an arbitrary multipart value. final FileUploadParams.BuilderaddResponseField(FileUploadParams.ResponseField responseField)Adds a single ResponseField to responseFields. final FileUploadParams.Buildersignature(String signature)HMAC-SHA1 digest of the token+expire using your ImageKit.io private API key as a key. final FileUploadParams.Buildersignature(MultipartField<String> signature)Sets Builder.signature to an arbitrary multipart value. final FileUploadParams.Buildertags(List<String> tags)Set the tags while uploading the file. final FileUploadParams.Buildertags(MultipartField<List<String>> tags)Sets Builder.tags to an arbitrary multipart value. final FileUploadParams.BuilderaddTag(String tag)Adds a single String to tags. final FileUploadParams.Buildertransformation(FileUploadParams.UploadTransformation transformation)Configure pre-processing ( pre) and post-processing (post) transformations.final FileUploadParams.Buildertransformation(MultipartField<FileUploadParams.UploadTransformation> transformation)Sets Builder.transformation to an arbitrary multipart value. final FileUploadParams.BuilderuseUniqueFileName(Boolean useUniqueFileName)Whether to use a unique filename for this file or not. final FileUploadParams.BuilderuseUniqueFileName(MultipartField<Boolean> useUniqueFileName)Sets Builder.useUniqueFileName to an arbitrary multipart value. final FileUploadParams.BuilderwebhookUrl(String webhookUrl)The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. final FileUploadParams.BuilderwebhookUrl(MultipartField<String> webhookUrl)Sets Builder.webhookUrl to an arbitrary multipart value. final FileUploadParams.BuilderadditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)final FileUploadParams.BuilderputAdditionalBodyProperty(String key, JsonValue value)final FileUploadParams.BuilderputAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)final FileUploadParams.BuilderremoveAdditionalBodyProperty(String key)final FileUploadParams.BuilderremoveAllAdditionalBodyProperties(Set<String> keys)final FileUploadParams.BuilderadditionalHeaders(Headers additionalHeaders)final FileUploadParams.BuilderadditionalHeaders(Map<String, Iterable<String>> additionalHeaders)final FileUploadParams.BuilderputAdditionalHeader(String name, String value)final FileUploadParams.BuilderputAdditionalHeaders(String name, Iterable<String> values)final FileUploadParams.BuilderputAllAdditionalHeaders(Headers additionalHeaders)final FileUploadParams.BuilderputAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)final FileUploadParams.BuilderreplaceAdditionalHeaders(String name, String value)final FileUploadParams.BuilderreplaceAdditionalHeaders(String name, Iterable<String> values)final FileUploadParams.BuilderreplaceAllAdditionalHeaders(Headers additionalHeaders)final FileUploadParams.BuilderreplaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)final FileUploadParams.BuilderremoveAdditionalHeaders(String name)final FileUploadParams.BuilderremoveAllAdditionalHeaders(Set<String> names)final FileUploadParams.BuilderadditionalQueryParams(QueryParams additionalQueryParams)final FileUploadParams.BuilderadditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)final FileUploadParams.BuilderputAdditionalQueryParam(String key, String value)final FileUploadParams.BuilderputAdditionalQueryParams(String key, Iterable<String> values)final FileUploadParams.BuilderputAllAdditionalQueryParams(QueryParams additionalQueryParams)final FileUploadParams.BuilderputAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)final FileUploadParams.BuilderreplaceAdditionalQueryParams(String key, String value)final FileUploadParams.BuilderreplaceAdditionalQueryParams(String key, Iterable<String> values)final FileUploadParams.BuilderreplaceAllAdditionalQueryParams(QueryParams additionalQueryParams)final FileUploadParams.BuilderreplaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)final FileUploadParams.BuilderremoveAdditionalQueryParams(String key)final FileUploadParams.BuilderremoveAllAdditionalQueryParams(Set<String> keys)final FileUploadParamsbuild()Returns an immutable instance of FileUploadParams. -
-
Method Detail
-
body
final FileUploadParams.Builder body(FileUploadParams.Body body)
Sets the entire request body.
This is generally only useful if you are already constructing the body separately. Otherwise, it's more convenient to use the top-level setters instead:
-
file
final FileUploadParams.Builder file(InputStream file)
The API accepts any of the following:
Binary data – send the raw bytes as
multipart/form-data.HTTP / HTTPS URL – a publicly reachable URL that ImageKit’s servers can fetch.
Base64 string – the file encoded as a Base64 data URI or plain Base64.
When supplying a URL, the server must receive the response headers within 8 seconds; otherwise the request fails with 400 Bad Request.
-
file
final FileUploadParams.Builder file(MultipartField<InputStream> file)
Sets Builder.file to an arbitrary multipart value.
You should usually call Builder.file with a well-typed InputStream value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
file
final FileUploadParams.Builder file(ByteArray file)
The API accepts any of the following:
Binary data – send the raw bytes as
multipart/form-data.HTTP / HTTPS URL – a publicly reachable URL that ImageKit’s servers can fetch.
Base64 string – the file encoded as a Base64 data URI or plain Base64.
When supplying a URL, the server must receive the response headers within 8 seconds; otherwise the request fails with 400 Bad Request.
-
file
final FileUploadParams.Builder file(Path path)
The API accepts any of the following:
Binary data – send the raw bytes as
multipart/form-data.HTTP / HTTPS URL – a publicly reachable URL that ImageKit’s servers can fetch.
Base64 string – the file encoded as a Base64 data URI or plain Base64.
When supplying a URL, the server must receive the response headers within 8 seconds; otherwise the request fails with 400 Bad Request.
-
fileName
final FileUploadParams.Builder fileName(String fileName)
The name with which the file has to be uploaded. The file name can contain:
Alphanumeric Characters:
a-z,A-Z,0-9.Special Characters:
.,-
Any other character including space will be replaced by
_
-
fileName
final FileUploadParams.Builder fileName(MultipartField<String> fileName)
Sets Builder.fileName to an arbitrary multipart value.
You should usually call Builder.fileName with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
token
final FileUploadParams.Builder token(String token)
A unique value that the ImageKit.io server will use to recognize and prevent subsequent retries for the same request. We suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. This field is only required for authentication when uploading a file from the client side.
Note: Sending a value that has been used in the past will result in a validation error. Even if your previous request resulted in an error, you should always send a new value for this field.
-
token
final FileUploadParams.Builder token(MultipartField<String> token)
Sets Builder.token to an arbitrary multipart value.
You should usually call Builder.token with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
checks
final FileUploadParams.Builder checks(String checks)
Server-side checks to run on the asset. Read more about /docs/api-reference/upload-file/upload-file#upload-api-checks.
-
checks
final FileUploadParams.Builder checks(MultipartField<String> checks)
Sets Builder.checks to an arbitrary multipart value.
You should usually call Builder.checks with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
customCoordinates
final FileUploadParams.Builder customCoordinates(String customCoordinates)
Define an important area in the image. This is only relevant for image type files.
To be passed as a string with the x and y coordinates of the top-left corner, and width and height of the area of interest in the format
x,y,width,height. For example -10,10,100,100Can be used with fo-customtransformation.
If this field is not specified and the file is overwritten, then customCoordinates will be removed.
-
customCoordinates
final FileUploadParams.Builder customCoordinates(MultipartField<String> customCoordinates)
Sets Builder.customCoordinates to an arbitrary multipart value.
You should usually call Builder.customCoordinates with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
customMetadata
final FileUploadParams.Builder customMetadata(FileUploadParams.CustomMetadata customMetadata)
JSON key-value pairs to associate with the asset. Create the custom metadata fields before setting these values.
-
customMetadata
final FileUploadParams.Builder customMetadata(MultipartField<FileUploadParams.CustomMetadata> customMetadata)
Sets Builder.customMetadata to an arbitrary multipart value.
You should usually call Builder.customMetadata with a well-typed CustomMetadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final FileUploadParams.Builder description(String description)
Optional text to describe the contents of the file.
-
description
final FileUploadParams.Builder description(MultipartField<String> description)
Sets Builder.description to an arbitrary multipart value.
You should usually call Builder.description with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expire
final FileUploadParams.Builder expire(Long expire)
The time until your signature is valid. It must be a Unix time in less than 1 hour into the future. It should be in seconds. This field is only required for authentication when uploading a file from the client side.
-
expire
final FileUploadParams.Builder expire(MultipartField<Long> expire)
Sets Builder.expire to an arbitrary multipart value.
You should usually call Builder.expire with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
extensions
final FileUploadParams.Builder extensions(List<ExtensionItem> extensions)
Array of extensions to be applied to the asset. Each extension can be configured with specific parameters based on the extension type.
-
extensions
final FileUploadParams.Builder extensions(MultipartField<List<ExtensionItem>> extensions)
Sets Builder.extensions to an arbitrary multipart value.
You should usually call Builder.extensions with a well-typed
List<ExtensionItem>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addExtension
final FileUploadParams.Builder addExtension(ExtensionItem extension)
Adds a single ExtensionItem to extensions.
-
addExtension
final FileUploadParams.Builder addExtension(ExtensionItem.RemoveBg removeBg)
Alias for calling addExtension with
ExtensionItem.ofRemoveBg(removeBg).
-
addExtension
final FileUploadParams.Builder addExtension(ExtensionItem.AutoTaggingExtension autoTaggingExtension)
Alias for calling addExtension with
ExtensionItem.ofAutoTaggingExtension(autoTaggingExtension).
-
addExtension
final FileUploadParams.Builder addExtension(ExtensionItem.AiTasks aiTasks)
Alias for calling addExtension with
ExtensionItem.ofAiTasks(aiTasks).
-
addExtension
final FileUploadParams.Builder addExtension(ExtensionItem.SavedExtension savedExtension)
Alias for calling addExtension with
ExtensionItem.ofSavedExtension(savedExtension).
-
addExtensionAiAutoDescription
final FileUploadParams.Builder addExtensionAiAutoDescription()
Alias for calling addExtension with
ExtensionItem.ofAiAutoDescription().
-
addAiTasksExtension
final FileUploadParams.Builder addAiTasksExtension(List<ExtensionItem.AiTasks.Task> tasks)
Alias for calling addExtension with the following:
ExtensionItem.AiTasks.builder() .tasks(tasks) .build()
-
addSavedExtensionExtension
final FileUploadParams.Builder addSavedExtensionExtension(String id)
Alias for calling addExtension with the following:
ExtensionItem.SavedExtension.builder() .id(id) .build()
-
folder
final FileUploadParams.Builder folder(String folder)
The folder path in which the image has to be uploaded. If the folder(s) didn't exist before, a new folder(s) is created.
The folder name can contain:
Alphanumeric Characters:
a-z,A-Z,0-9Special Characters:
/,_,-
Using multiple
/creates a nested folder.
-
folder
final FileUploadParams.Builder folder(MultipartField<String> folder)
Sets Builder.folder to an arbitrary multipart value.
You should usually call Builder.folder with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
isPrivateFile
final FileUploadParams.Builder isPrivateFile(Boolean isPrivateFile)
Whether to mark the file as private or not.
If
true, the file is marked as private and is accessible only using named transformation or signed URL.
-
isPrivateFile
final FileUploadParams.Builder isPrivateFile(MultipartField<Boolean> isPrivateFile)
Sets Builder.isPrivateFile to an arbitrary multipart value.
You should usually call Builder.isPrivateFile with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
isPublished
final FileUploadParams.Builder isPublished(Boolean isPublished)
Whether to upload file as published or not.
If
false, the file is marked as unpublished, which restricts access to the file only via the media library. Files in draft or unpublished state can only be publicly accessed after being published.The option to upload in draft state is only available in custom enterprise pricing plans.
-
isPublished
final FileUploadParams.Builder isPublished(MultipartField<Boolean> isPublished)
Sets Builder.isPublished to an arbitrary multipart value.
You should usually call Builder.isPublished with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
overwriteAiTags
final FileUploadParams.Builder overwriteAiTags(Boolean overwriteAiTags)
If set to
trueand a file already exists at the exact location, its AITags will be removed. SetoverwriteAITagstofalseto preserve AITags.
-
overwriteAiTags
final FileUploadParams.Builder overwriteAiTags(MultipartField<Boolean> overwriteAiTags)
Sets Builder.overwriteAiTags to an arbitrary multipart value.
You should usually call Builder.overwriteAiTags with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
overwriteCustomMetadata
final FileUploadParams.Builder overwriteCustomMetadata(Boolean overwriteCustomMetadata)
If the request does not have
customMetadata, and a file already exists at the exact location, existing customMetadata will be removed.
-
overwriteCustomMetadata
final FileUploadParams.Builder overwriteCustomMetadata(MultipartField<Boolean> overwriteCustomMetadata)
Sets Builder.overwriteCustomMetadata to an arbitrary multipart value.
You should usually call Builder.overwriteCustomMetadata with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
overwriteFile
final FileUploadParams.Builder overwriteFile(Boolean overwriteFile)
If
falseanduseUniqueFileNameis alsofalse, and a file already exists at the exact location, upload API will return an error immediately.
-
overwriteFile
final FileUploadParams.Builder overwriteFile(MultipartField<Boolean> overwriteFile)
Sets Builder.overwriteFile to an arbitrary multipart value.
You should usually call Builder.overwriteFile with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
overwriteTags
final FileUploadParams.Builder overwriteTags(Boolean overwriteTags)
If the request does not have
tags, and a file already exists at the exact location, existing tags will be removed.
-
overwriteTags
final FileUploadParams.Builder overwriteTags(MultipartField<Boolean> overwriteTags)
Sets Builder.overwriteTags to an arbitrary multipart value.
You should usually call Builder.overwriteTags with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
publicKey
final FileUploadParams.Builder publicKey(String publicKey)
Your ImageKit.io public key. This field is only required for authentication when uploading a file from the client side.
-
publicKey
final FileUploadParams.Builder publicKey(MultipartField<String> publicKey)
Sets Builder.publicKey to an arbitrary multipart value.
You should usually call Builder.publicKey with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
responseFields
final FileUploadParams.Builder responseFields(List<FileUploadParams.ResponseField> responseFields)
Array of response field keys to include in the API response body.
-
responseFields
final FileUploadParams.Builder responseFields(MultipartField<List<FileUploadParams.ResponseField>> responseFields)
Sets Builder.responseFields to an arbitrary multipart value.
You should usually call Builder.responseFields with a well-typed
List<ResponseField>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addResponseField
final FileUploadParams.Builder addResponseField(FileUploadParams.ResponseField responseField)
Adds a single ResponseField to responseFields.
-
signature
final FileUploadParams.Builder signature(String signature)
HMAC-SHA1 digest of the token+expire using your ImageKit.io private API key as a key. Learn how to create a signature on the page below. This should be in lowercase.
Signature must be calculated on the server-side. This field is only required for authentication when uploading a file from the client side.
-
signature
final FileUploadParams.Builder signature(MultipartField<String> signature)
Sets Builder.signature to an arbitrary multipart value.
You should usually call Builder.signature with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tags
final FileUploadParams.Builder tags(List<String> tags)
Set the tags while uploading the file. Provide an array of tag strings (e.g.
["tag1", "tag2", "tag3"]). The combined length of all tag characters must not exceed 500, and the%character is not allowed. If this field is not specified and the file is overwritten, the existing tags will be removed.
-
tags
final FileUploadParams.Builder tags(MultipartField<List<String>> tags)
Sets Builder.tags to an arbitrary multipart value.
You should usually call Builder.tags with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTag
final FileUploadParams.Builder addTag(String tag)
-
transformation
final FileUploadParams.Builder transformation(FileUploadParams.UploadTransformation transformation)
Configure pre-processing (
pre) and post-processing (post) transformations.pre— applied before the file is uploaded to the Media Library. Useful for reducing file size or applying basic optimizations upfront (e.g., resize, compress).post— applied immediately after upload. Ideal for generating transformed versions (like video encodes or thumbnails) in advance, so they're ready for delivery without delay.
You can mix and match any combination of post-processing types.
-
transformation
final FileUploadParams.Builder transformation(MultipartField<FileUploadParams.UploadTransformation> transformation)
Sets Builder.transformation to an arbitrary multipart value.
You should usually call Builder.transformation with a well-typed UploadTransformation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
useUniqueFileName
final FileUploadParams.Builder useUniqueFileName(Boolean useUniqueFileName)
Whether to use a unique filename for this file or not.
If
true, ImageKit.io will add a unique suffix to the filename parameter to get a unique filename.If
false, then the image is uploaded with the provided filename parameter, and any existing file with the same name is replaced.
-
useUniqueFileName
final FileUploadParams.Builder useUniqueFileName(MultipartField<Boolean> useUniqueFileName)
Sets Builder.useUniqueFileName to an arbitrary multipart value.
You should usually call Builder.useUniqueFileName with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
webhookUrl
final FileUploadParams.Builder webhookUrl(String webhookUrl)
The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. /docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure about the webhook payload structure.
-
webhookUrl
final FileUploadParams.Builder webhookUrl(MultipartField<String> webhookUrl)
Sets Builder.webhookUrl to an arbitrary multipart value.
You should usually call Builder.webhookUrl with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalBodyProperties
final FileUploadParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final FileUploadParams.Builder putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final FileUploadParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final FileUploadParams.Builder removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final FileUploadParams.Builder removeAllAdditionalBodyProperties(Set<String> keys)
-
additionalHeaders
final FileUploadParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final FileUploadParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
putAdditionalHeader
final FileUploadParams.Builder putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final FileUploadParams.Builder putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final FileUploadParams.Builder putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final FileUploadParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final FileUploadParams.Builder replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final FileUploadParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final FileUploadParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final FileUploadParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final FileUploadParams.Builder removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final FileUploadParams.Builder removeAllAdditionalHeaders(Set<String> names)
-
additionalQueryParams
final FileUploadParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final FileUploadParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
putAdditionalQueryParam
final FileUploadParams.Builder putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final FileUploadParams.Builder putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final FileUploadParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final FileUploadParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final FileUploadParams.Builder replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final FileUploadParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final FileUploadParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final FileUploadParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final FileUploadParams.Builder removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final FileUploadParams.Builder removeAllAdditionalQueryParams(Set<String> keys)
-
build
final FileUploadParams build()
Returns an immutable instance of FileUploadParams.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.file() .fileName()
-
-
-