Last active
June 23, 2019 09:00
-
-
Save WingCH/f7c7bb394b47309ed691d2b480ca610f to your computer and use it in GitHub Desktop.
Python ajax upload file to python server(bottle)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import Bottle, run, template, request, static_file | |
import os | |
import json | |
app = Bottle() | |
@app.route('/uploadTest', method='POST') #upload page | |
def uploadTest(): | |
filename = request.files.get('file').raw_filename | |
return filename | |
run(app, host='localhost', port=8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment