capture errors thrown on upload preprocessing create
This commit is contained in:
@@ -322,11 +322,10 @@ class UploadService
|
|||||||
params[:tag_string] ||= "tagme"
|
params[:tag_string] ||= "tagme"
|
||||||
|
|
||||||
CurrentUser.as(User.find(uploader_id)) do
|
CurrentUser.as(User.find(uploader_id)) do
|
||||||
upload = Upload.create!(params)
|
|
||||||
|
|
||||||
upload.update(status: "preprocessing")
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
upload = Upload.create!(params)
|
||||||
|
upload.update(status: "preprocessing")
|
||||||
|
|
||||||
if source.present?
|
if source.present?
|
||||||
file = Utils.download_for_upload(source, upload)
|
file = Utils.download_for_upload(source, upload)
|
||||||
elsif params[:file].present?
|
elsif params[:file].present?
|
||||||
|
|||||||
Reference in New Issue
Block a user