Created
January 10, 2016 20:31
-
-
Save level09/f92d3e27a95af9055b25 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@bp_public.route('/video-upload',methods=['POST']) | |
@login_required | |
def video_upload(): | |
file = request.files['file'] if 'file' in request.files else None | |
if file: | |
file_name = datetime.strftime(datetime.now(),'%Y%m%d-%H%S') +'-'+ secure_filename(file.filename) | |
file.save(os.path.join(Config.UPLOAD_DIR,file_name)) | |
return file_name, 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment