Guest User

Untitled

a guest
Apr 25th, 2018
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. @app.route('/upload', methods=['POST'])
  2. def upload_file():
  3.     if file and allowed_file(file.filename):
  4.             filename = secure_filename(file.filename)
  5.             file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
  6.             return redirect(url_for('uploaded_file',
  7.                                     filename=filename))
  8.     return ''
Add Comment
Please, Sign In to add comment