|
|
|
@ -670,7 +670,7 @@ def upload_single_file(request, book, book_id):
|
|
|
|
|
# Queue uploader info
|
|
|
|
|
link = '<a href="{}">{}</a>'.format(url_for('web.show_book', book_id=book.id), escape(book.title))
|
|
|
|
|
uploadText=_(u"File format %(ext)s added to %(book)s", ext=file_ext.upper(), book=link)
|
|
|
|
|
WorkerThread.add(current_user.name, TaskUpload(uploadText))
|
|
|
|
|
WorkerThread.add(current_user.name, TaskUpload(uploadText), escape(book.title))
|
|
|
|
|
|
|
|
|
|
return uploader.process(
|
|
|
|
|
saved_filename, *os.path.splitext(requested_file.filename),
|
|
|
|
@ -1092,7 +1092,7 @@ def upload():
|
|
|
|
|
flash(error, category="error")
|
|
|
|
|
link = '<a href="{}">{}</a>'.format(url_for('web.show_book', book_id=book_id), escape(title))
|
|
|
|
|
uploadText = _(u"File %(file)s uploaded", file=link)
|
|
|
|
|
WorkerThread.add(current_user.name, TaskUpload(uploadText))
|
|
|
|
|
WorkerThread.add(current_user.name, TaskUpload(uploadText, escape(title)))
|
|
|
|
|
|
|
|
|
|
if len(request.files.getlist("btn-upload")) < 2:
|
|
|
|
|
if current_user.role_edit() or current_user.role_admin():
|
|
|
|
|