Interface FileServiceAsync
-
- All Implemented Interfaces:
public interface FileServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceFileServiceAsync.WithRawResponseA view of FileServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract FileServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract FileServiceAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
bulk
abstract BulkServiceAsync bulk()
-
versions
abstract VersionServiceAsync versions()
-
metadata
abstract MetadataServiceAsync metadata()
-
update
CompletableFuture<FileUpdateResponse> update(String fileId, FileUpdateParams params)
This API updates the details or attributes of the current version of the file. You can update
tags,customCoordinates,customMetadata, publication status, remove existingAITagsand apply extensions using this API.
-
update
CompletableFuture<FileUpdateResponse> update(String fileId, FileUpdateParams params, RequestOptions requestOptions)
-
update
CompletableFuture<FileUpdateResponse> update(FileUpdateParams params)
-
update
abstract CompletableFuture<FileUpdateResponse> update(FileUpdateParams params, RequestOptions requestOptions)
-
delete
CompletableFuture<Void> delete(String fileId)
This API deletes the file and all its file versions permanently.
Note: If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using purge cache API.
-
delete
CompletableFuture<Void> delete(String fileId, FileDeleteParams params, RequestOptions requestOptions)
-
delete
CompletableFuture<Void> delete(String fileId, FileDeleteParams params)
-
delete
abstract CompletableFuture<Void> delete(FileDeleteParams params, RequestOptions requestOptions)
-
delete
CompletableFuture<Void> delete(FileDeleteParams params)
-
delete
CompletableFuture<Void> delete(String fileId, RequestOptions requestOptions)
-
copy
CompletableFuture<FileCopyResponse> copy(FileCopyParams params)
This will copy a file from one folder to another.
Note: If any file at the destination has the same name as the source file, then the source file and its versions (if
includeFileVersionsis set to true) will be appended to the destination file version history.
-
copy
abstract CompletableFuture<FileCopyResponse> copy(FileCopyParams params, RequestOptions requestOptions)
-
get
CompletableFuture<File> get(String fileId)
This API returns an object with details or attributes about the current version of the file.
-
get
CompletableFuture<File> get(String fileId, FileGetParams params, RequestOptions requestOptions)
-
get
CompletableFuture<File> get(String fileId, FileGetParams params)
-
get
abstract CompletableFuture<File> get(FileGetParams params, RequestOptions requestOptions)
-
get
CompletableFuture<File> get(FileGetParams params)
-
get
CompletableFuture<File> get(String fileId, RequestOptions requestOptions)
-
move
CompletableFuture<FileMoveResponse> move(FileMoveParams params)
This will move a file and all its versions from one folder to another.
Note: If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file.
-
move
abstract CompletableFuture<FileMoveResponse> move(FileMoveParams params, RequestOptions requestOptions)
-
rename
CompletableFuture<FileRenameResponse> rename(FileRenameParams params)
You can rename an already existing file in the media library using rename file API. This operation would rename all file versions of the file.
Note: The old URLs will stop working. The file/file version URLs cached on CDN will continue to work unless a purge is requested.
-
rename
abstract CompletableFuture<FileRenameResponse> rename(FileRenameParams params, RequestOptions requestOptions)
-
upload
CompletableFuture<FileUploadResponse> upload(FileUploadParams params)
ImageKit.io allows you to upload files directly from both the server and client sides. For server-side uploads, private API key authentication is used. For client-side uploads, generate a one-time
token,signature, andexpirefrom your secure backend using private API. /docs/api-reference/upload-file/upload-file#how-to-implement-client-side-file-upload about how to implement client-side file upload.The /docs/api-reference/upload-file/upload-file-v2 enhances security by verifying the entire payload using JWT.
File size limit \ On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw files and 100MB for videos. On the Lite paid plan, these limits increase to 40MB for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan, these limits increase to 50MB for images, audio, and raw files and 2GB for videos. These limits can be further increased with enterprise plans.
Version limit \ A file can have a maximum of 100 versions.
Demo applications
A full-fledged upload widget using Uppy, supporting file selections from local storage, URL, Dropbox, Google Drive, Instagram, and more.
/docs/quick-start-guides for various frameworks and technologies.
-
upload
abstract CompletableFuture<FileUploadResponse> upload(FileUploadParams params, RequestOptions requestOptions)
-
-
-
-