@bp_video.route('/upload', methods=['GET','POST'])
def create():
my_file = Path(app.root_path + '/' + app.config['UPLOAD_FOLDER'] + '/videos')
if not my_file.exists():
os.makedirs(app.root_path + '/' + app.config['UPLOAD_FOLDER'] + '/videos')
if request.method == 'POST':
if 'video' in request.files:
file = request.files["video"]
clip1 = VideoFileClip(file).subclip(00.01,00.10)
clip1.write_videofile(app.root_path + '/' + app.config['UPLOAD_FOLDER'] + '/videos' +
'dd.mp4',codec='libx264')
错误:
AttributeError:' _io.BufferedRandom'对象没有属性 '的endsWith'
request.file [" video"] - > FileStorage:' aideed.mp4' ('视频/ MP4&#39)
目录文件指向静态文件。 我的代码有什么问题,有人可以帮忙吗?