-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS-82 Add file upload api #16
Conversation
02e99c9
to
38289a4
Compare
|
||
def handle_file_upload(file:UploadFile) -> str: | ||
|
||
if (file.size or 0) > MAX_FILE_SIZE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is to protect from file.size
being None
, did you see this happen during testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was always set in test. I've updated the local FileUpload type to match with the None to simplify copying values below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. If you can add a link to where you found the default redis config file online that would be helpful if we need to make changes in the future. Minor detail though
7cd86cb
to
6fc0607
Compare
Description
Add
/uploadfile
endpoint for uploading files (txt or pdf). PDF files have the text extracted using pypdf.Text from the files is stored in redis.
Changelog
/uploadfile
POST endpoint for uploading files