mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 06:42:32 -05:00
fix preview
This commit is contained in:
1 parent
809c6b1aa8
commit
a6e22adf2e
1 file changed
+1
-1
@@ -41,7 +41,7 @@ class PreviewDocumentPageController < ActionController::API
|
||||
end
|
||||
|
||||
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|
|
||||
f.flock(File::LOCK_EX)
|
||||
|
||||
Reference in new issue
Block a user