fix preview
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user