Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- req = requests.post('https://www.otherserver.com/_download_file', data = {'filename':filename})
- @app.route('/_download_file', methods = ['POST'])
- def download_file():
- filename = requests.form.get('filename')
- file_data = codecs.open(filename, 'rb').read()
- return file_data
- with codecs.open(req, 'w') as f:
- f.write('new_file.xyz')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement