diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bcf42ccbc..5a706e38a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -385,7 +385,7 @@ class ApplicationController < ActionController::Base def current_user if Rails.env.development? - User.current = User.find 36480 + User.current = User.find 1 else User.current end diff --git a/app/views/attachments/_attachment_simple.json.jbuilder b/app/views/attachments/_attachment_simple.json.jbuilder index 6737838d1..46250489f 100644 --- a/app/views/attachments/_attachment_simple.json.jbuilder +++ b/app/views/attachments/_attachment_simple.json.jbuilder @@ -3,6 +3,7 @@ json.title attachment.title json.filesize number_to_human_size attachment.filesize json.description attachment.description json.is_pdf attachment.is_pdf? +json.absolute_path absolute_path(local_path(attachment)) json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment) # json.url download_url(attachment) json.set! :delete, delete.nil? ? true : delete if defined? delete \ No newline at end of file