diff --git a/app/logical/upload_service/preprocessor.rb b/app/logical/upload_service/preprocessor.rb index ba268ec78..0889f29a5 100644 --- a/app/logical/upload_service/preprocessor.rb +++ b/app/logical/upload_service/preprocessor.rb @@ -111,6 +111,7 @@ class UploadService # we went through a lot of trouble normalizing the source, # so don't overwrite it with whatever the user provided + pred.source = "" if pred.source.nil? pred.attributes = self.params.except(:source) # if a file was uploaded after the preprocessing occurred, diff --git a/app/presenters/upload_presenter.rb b/app/presenters/upload_presenter.rb index 576008529..36f9babd3 100644 --- a/app/presenters/upload_presenter.rb +++ b/app/presenters/upload_presenter.rb @@ -9,6 +9,9 @@ class UploadPresenter < Presenter dup_post_id = $1 template.link_to(@upload.status.gsub(/error: RuntimeError - /, ""), template.__send__(:post_path, dup_post_id)) + when /\Aerror: / + @upload.status.gsub(/DETAIL:.+/m, "...") + else @upload.status end