fix invalid content type leaving upload stuck in preprocessing status (#3896)

This commit is contained in:
Albert Yi
2018-09-13 13:50:18 -07:00
parent 4b75ccf89f
commit 6dd64da9ba
2 changed files with 13 additions and 1 deletions

View File

@@ -104,7 +104,7 @@ class UploadService
upload.status = "preprocessed"
upload.save!
rescue Exception => x
upload.update(status: "error: #{x.class} - #{x.message}", backtrace: x.backtrace.join("\n"))
upload.update(file_ext: nil, status: "error: #{x.class} - #{x.message}", backtrace: x.backtrace.join("\n"))
end
return upload