Hi Giles,
I'm using Flask. Saw some code online that can be used like the one below:
http://www.patricksoftwareblog.com/receiving-files-with-a-flask-rest-api/
But not sure, where exactly I need to write this in the overall package. This is my code to for the home page.
where / how should I write the code to handle API requests?
@application.route('/', methods=['GET', 'POST'])
def upload_file():
if request.method == 'POST':
# check if the post request has the file part
if 'file' not in request.files:
flash('No file part')
return redirect(request.url)
file = request.files['file']
...
return render_template('upload_file.html')