Module file_api

Source

Enums§

DeleteFileHandlerError
struct for typed errors of method delete_file_handler
GetDatasetFilesHandlerError
struct for typed errors of method get_dataset_files_handler
GetFileHandlerError
struct for typed errors of method get_file_handler
UploadFileHandlerError
struct for typed errors of method upload_file_handler

Functions§

delete_file_handler
Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but only delete them all together if you specify delete_chunks to be true. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
get_dataset_files_handler
Get all files which belong to a given dataset specified by the dataset_id parameter. 10 files are returned per page.
get_file_handler
Download a file based on its id.
upload_file_handler
Upload a file to S3 attached to the server. The file will be converted to HTML with tika and chunked algorithmically, images will be OCR’ed with tesseract. The resulting chunks will be indexed and searchable. Optionally, you can only upload the file and manually create chunks associated to the file after. See docs.trieve.ai and/or contact us for more details and tips. Auth’ed user must be an admin or owner of the dataset’s organization to upload a file.