Jul-05-2020, 10:33 AM
(This post was last modified: Jul-05-2020, 10:36 AM by RedLeonard.)
changing script to this:
saves this to EFL9:
{'file': <FileStorage: 'why.txt' (None)>}
so, doesn't look like the contents of the file can be sent in this way? Anyone know how to fix this? thanks
@app.route('/postit2', methods=['GET', 'POST']) def postit2(): d = request.files.to_dict() with open('/home/MadMartin/datapostfiles/EFL9.txt', 'w') as f: #read_data = f.read() f.write(str(d)) return '''ok'''
saves this to EFL9:
{'file': <FileStorage: 'why.txt' (None)>}
so, doesn't look like the contents of the file can be sent in this way? Anyone know how to fix this? thanks