I've been reading so many ways to upload a file using bottle.py but all of them requires user interaction. I would like to upload a python file and print some lists in a web with no form, "Choose file" or "Submit" button.
From the code below I would like to get the file to localhost and print some lists varibles.
from bottle import route, request, run, FileUpload
@route('/upload', method='POST')
def upload():
upload.save("../connectedDevices.py", overwrite=True)
run(host='localhost', port=8080)
Aucun commentaire:
Enregistrer un commentaire