Image file upload - process - download

34 views
Skip to first unread message

gt stack

unread,
May 21, 2019, 5:56:07 AM5/21/19
to Django REST framework
  1. 1. I want the client to access the website www.abc.com

  2. 2. Then upload an IMAGE FILE

  3. 3. Process the image at the server and return the processed file back to the client

I wish to know how to accomplish this task in python using Flask and REST API?

or

Should I go for Django REST Framework to achieve the same?

Carl Nobile

unread,
May 27, 2019, 8:56:41 PM5/27/19
to Django REST framework
Well, this is a Django REST Framework group, so you're not going to find a lot of Flask help here.

With that said, yes this should be possible in any framework, your biggest problem is going to be how long it takes to process the file. If it takes much longer than several seconds you will need to return a 202 response with some sort of object that says what the status is on a different endpoint. You will need to poll this endpoint and eventually it should return to you a 303 and redirect you back to where you can pick up the processed file. This is the way the RFCs explain how to do it.


and


~Carl
Reply all
Reply to author
Forward
0 new messages