Interface FileService
-
- All Implemented Interfaces:
public interface FileService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceFileService.WithRawResponseA view of FileService that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract FileService.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. abstract FileServicewithOptions(Consumer<ClientOptions.Builder> modifier)Returns a view of this service with the given option modifications applied. abstract BulkServicebulk()abstract VersionServiceversions()abstract MetadataServicemetadata()FileUpdateResponseupdate(String fileId, FileUpdateParams params)This API updates the details or attributes of the current version of the file. FileUpdateResponseupdate(String fileId, FileUpdateParams params, RequestOptions requestOptions)FileUpdateResponseupdate(FileUpdateParams params)abstract FileUpdateResponseupdate(FileUpdateParams params, RequestOptions requestOptions)Unitdelete(String fileId)This API deletes the file and all its file versions permanently. Unitdelete(String fileId, FileDeleteParams params, RequestOptions requestOptions)Unitdelete(String fileId, FileDeleteParams params)abstract Unitdelete(FileDeleteParams params, RequestOptions requestOptions)Unitdelete(FileDeleteParams params)Unitdelete(String fileId, RequestOptions requestOptions)FileCopyResponsecopy(FileCopyParams params)This will copy a file from one folder to another. abstract FileCopyResponsecopy(FileCopyParams params, RequestOptions requestOptions)Fileget(String fileId)This API returns an object with details or attributes about the current version of the file. Fileget(String fileId, FileGetParams params, RequestOptions requestOptions)Fileget(String fileId, FileGetParams params)abstract Fileget(FileGetParams params, RequestOptions requestOptions)Fileget(FileGetParams params)Fileget(String fileId, RequestOptions requestOptions)FileMoveResponsemove(FileMoveParams params)This will move a file and all its versions from one folder to another. abstract FileMoveResponsemove(FileMoveParams params, RequestOptions requestOptions)FileRenameResponserename(FileRenameParams params)You can rename an already existing file in the media library using rename file API. abstract FileRenameResponserename(FileRenameParams params, RequestOptions requestOptions)FileUploadResponseupload(FileUploadParams params)ImageKit.io allows you to upload files directly from both the server and client sides. abstract FileUploadResponseupload(FileUploadParams params, RequestOptions requestOptions)-
-
Method Detail
-
withRawResponse
abstract FileService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract FileService 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 BulkService bulk()
-
versions
abstract VersionService versions()
-
metadata
abstract MetadataService metadata()
-
update
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
FileUpdateResponse update(String fileId, FileUpdateParams params, RequestOptions requestOptions)
-
update
FileUpdateResponse update(FileUpdateParams params)
-
update
abstract FileUpdateResponse update(FileUpdateParams params, RequestOptions requestOptions)
-
delete
Unit 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
Unit delete(String fileId, FileDeleteParams params, RequestOptions requestOptions)
-
delete
Unit delete(String fileId, FileDeleteParams params)
-
delete
abstract Unit delete(FileDeleteParams params, RequestOptions requestOptions)
-
delete
Unit delete(FileDeleteParams params)
-
delete
Unit delete(String fileId, RequestOptions requestOptions)
-
copy
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 FileCopyResponse copy(FileCopyParams params, RequestOptions requestOptions)
-
get
File get(String fileId)
This API returns an object with details or attributes about the current version of the file.
-
get
File get(String fileId, FileGetParams params, RequestOptions requestOptions)
-
get
File get(String fileId, FileGetParams params)
-
get
abstract File get(FileGetParams params, RequestOptions requestOptions)
-
get
File get(FileGetParams params)
-
get
File get(String fileId, RequestOptions requestOptions)
-
move
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 FileMoveResponse move(FileMoveParams params, RequestOptions requestOptions)
-
rename
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 FileRenameResponse rename(FileRenameParams params, RequestOptions requestOptions)
-
upload
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 FileUploadResponse upload(FileUploadParams params, RequestOptions requestOptions)
-
-
-
-