mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 15: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
@@ -17,7 +17,7 @@ class TemplatesUploadsController < ApplicationController
|
||||
save_template!(@template, url_params)
|
||||
|
||||
documents, = Templates::CreateAttachments.call(@template, url_params || params, extract_fields: true)
|
||||
schema = documents.map { |doc| { attachment_uuid: doc.uuid, name: doc.filename.base } }
|
||||
schema = documents.map { |doc| { attachment_uuid: doc.uuid, name: FilenameUtils.basename(doc.blob[:filename]) } }
|
||||
|
||||
if @template.fields.blank?
|
||||
@template.fields = Templates::ProcessDocument.normalize_attachment_fields(@template, documents)
|
||||
|
||||
Reference in new issue
Block a user