mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 23:42:32 -05:00
adjust filename
This commit is contained in:
1 parent
256d14eb94
commit
1b63b16691
12 files changed
+26
-14
No files matched your search
@@ -26,7 +26,7 @@ module Templates
|
||||
def create_document!(template, attachment, data, scan)
|
||||
blob = ActiveStorage::Blob.create_and_upload!(
|
||||
io: StringIO.new(data),
|
||||
filename: "#{attachment.filename.base}.#{scan ? 'png' : 'jpg'}",
|
||||
filename: "#{FilenameUtils.basename(attachment.blob[:filename])}.#{scan ? 'png' : 'jpg'}",
|
||||
metadata: { identified: true, analyzed: true },
|
||||
content_type: scan ? 'image/png' : 'image/jpeg'
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user