Module backend.files

This file handles the functionality for using AWS S3 for storing resume files in the cloud. There are functions for uploading files, viewing files, deleting files, downloading files, and scraping text content from the pdf file. These functions are all within the context of the current user.

Functions

def delete_file(Files)

Deletes a file from the system for the given user from AWS S3.

Request:
{ 
}
Response:
{
    status: 200
    data: Success message

    status: 500
    data: Error message

}
def download_file(Files)

Downloads the given file to the client machine from AWS S3.

Request:
{

}
Response:
{
    status: 200
    data: Success message

    status: 500
    data: Error message

    status: 501
    data: Authorization required

}
def get_pdf_info(file_req_name, Files, email)

Helper function to extract the values from a pdf in the AWS S3 bucket.

def upload_file(UserRecords, Files)

Uploads a file to the system for the given user using AWS S3.

Request:
{
    email: string,
    start: string,
    file: file,
    end: string,
    filename: string

}
Response:
{
    status: 200
    data: Success message

    status: 500
    data: Error message

}
def view_files(Files)

Retrieves the files for the given user that were uploaded to AWS S3.

Request:
{
    email: string  
}
Response:
{
    status: 200
    data: Success message

    status: 500
    data: Error message

}