Find answers from the community

Updated 2 years ago

Post files

is there an easy way, and hopefully also a safe way, to read a document in through an API file POST and ask it a cached question?
L
n
3 comments
Normally in python, in a post request, you can read/open the file as normal, since it's likely already a bytesIO object.

See this flask example, where a user can upload a txt file

Although if the file is larger, I think you have to write it to disk temporarily

https://stackoverflow.com/questions/20015550/read-file-data-without-saving-it-in-flask
Yeah I was using that for a proof of concept, thanks so much for the repo.
Add a reply
Sign up and join the conversation on Discord