1 from flask import Flask
2 from flask_restful import Resource, Api, reqparse
3 import werkzeug
4
5 class UploadAudio(Resource):
6 def post(self):
7 parse = reqparse.RequestParser()
8 parse.add_argument('file', type=werkzeug.datastructures.FileStorage, location='files')
9 args = parse.parse_args()
10 audioFile = args['file']
11 audioFile.save("your_file_name.jpg")