new FileRepository()
Methods
(async) getFileInformation(fileId) → {Promise.<FileModel>}
Get the related information of a file.
Parameters:
Name | Type | Description |
---|---|---|
fileId |
String | The file ID of the requested file |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
A
File model
.for the requested file ID
- Type
- Promise.<FileModel>
(async) uploadFiles(files) → {Promise.<Array.<FileModel>>}
Upload new files
Parameters:
Name | Type | Description |
---|---|---|
files |
Array.<File> | the files objects to upload |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
An array of
File models
for the uploaded files
- Type
- Promise.<Array.<FileModel>>
(async) deleteFile(fileId) → {Promise.<Boolean>}
Deletes a file.
Parameters:
Name | Type | Description |
---|---|---|
fileId |
String | The file ID of the file to be deleted |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
true if the file has been successfully deleted, false otherwise
- Type
- Promise.<Boolean>