fix preview

master^2
Pete Matsyburka 6 days ago
parent 809c6b1aa8
commit a6e22adf2e

@ -41,7 +41,7 @@ class PreviewDocumentPageController < ActionController::API
end end
def find_or_create_document_tempfile_path(attachment) def find_or_create_document_tempfile_path(attachment)
file_path = "#{Dir.tmpdir}/#{attachment.uuid}" file_path = "#{Dir.tmpdir}/attachment-#{Digest::SHA1.hexdigest("#{attachment.id}-#{attachment.uuid}")}"
File.open(file_path, File::RDWR | File::CREAT, 0o644) do |f| File.open(file_path, File::RDWR | File::CREAT, 0o644) do |f|
f.flock(File::LOCK_EX) f.flock(File::LOCK_EX)

Loading…
Cancel
Save