Skip to content

Commit

Permalink
fix : flask
Browse files Browse the repository at this point in the history
  • Loading branch information
sycuuui committed Apr 17, 2024
1 parent 686ca4b commit d5da7fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def handle_video():

@app.route('/image', methods=['POST'])
def image_test():
print('start')
if 'file' not in request.files:
return "No file part", 400
file = request.files['file']
Expand All @@ -59,7 +60,7 @@ def image_test():
filename = os.path.join('/tmp', file.filename)
file.save(filename)

return send_file(filename, mimetype='image.jpeg', as_attachment=True)
return 'success'


if __name__ == '__main__':
Expand Down

0 comments on commit d5da7fa

Please sign in to comment.