File management
Upload file
The uploadFile() function uploads a document to a specified directory and assigns it a unique id. This function takes a local file path, a destination directory in aws and the bucket name in aws as input parameters and returns the unique id assigned to the uploaded document.
1 2 3 4 5 6 7 8 9 | |
This function is useful when you want to upload a file and track it with a unique id. The unique id returned by this function can be used for future reference to the uploaded document.
Delete file
The delete_file() function deletes a document from aws using key and bucket values mentioned by the user.
1 2 3 4 5 | |
This function is useful when you want to delete a file completely from the file manager.
Get all files
The getAllFiles() function returns all the files present in the file manager. This helps the user to have a quick look at the name of the file and the directory in which it is present. Since it is a GET function, no parameters are needed to execute this function.
1 2 3 4 5 | |
getFileType
The getFileType() function retrieves the type of a file based on its file ID. It requires the file ID as input and returns the file type.
1 2 3 4 5 6 7 | |
categorizeFile
The categorizeFile() function categorizes a file based on the provided options. It requires the file ID and a list of options to categorize the file.
1 2 3 4 5 6 7 8 | |