Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route('/file', methods=["POST"])
- def upload_file():
- if "user_file" not in request.files:
- return "No user_file key in request.files"
- file = request.files["user_file"]
- if file.filename == "":
- return "Please select a file"
- # get url from s3
- output = upload_to_aws_s3(file, S3_BUCKET)
- return str(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement