I'm new to python-flask. i created the end points by using restless api ,my question is ,while posting the data through android app the data will not be inserted to the API. here what is the problem .
Asked
Active
Viewed 164 times
-1
-
What do you mean by **data will not be inserted to the API**?? – 0xtvarun Jan 29 '18 at 10:57
-
i have database models in flask framework and create the http methods to endpoints by using restless api. here my problem is while posting the data through android app ,it showing error. – jyothi reddy Jan 29 '18 at 11:01
-
Please update the question with the error, It will help better understand your question – 0xtvarun Jan 29 '18 at 11:03
-
can you suggest any document for this question. – jyothi reddy Jan 29 '18 at 11:07
-
https://www.androidhive.info/2014/12/android-uploading-camera-image-video-to-server-with-progress-bar/ – 0xtvarun Jan 29 '18 at 11:09
-
i am appreciating you, but in flask how to pust it to server the API has to accept images. – jyothi reddy Jan 29 '18 at 11:14
-
do i change any code in API. – jyothi reddy Jan 29 '18 at 11:15
1 Answers
1
Files in flask request can be accessed via the request.files
@app.route("/api/imgupload", methods=["POST"])
def upload():
file = request.files[<input-name>]

0xtvarun
- 698
- 6
- 18