mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 23:12:33 -05:00
remove active storage analyzers
This commit is contained in:
1 parent
a2c9ac1707
commit
b2d9948c30
7 files changed
+21
-12
No files matched your search
+3
-2
@@ -122,7 +122,7 @@ module Submitters
|
||||
end
|
||||
end
|
||||
|
||||
def create_attachment!(submitter, file)
|
||||
def create_attachment!(submitter, file, metadata: {})
|
||||
raise ParamsError, 'file param is missing' if file.blank?
|
||||
|
||||
extension = File.extname(file.original_filename).delete_prefix('.').downcase
|
||||
@@ -133,7 +133,8 @@ module Submitters
|
||||
|
||||
blob = ActiveStorage::Blob.create_and_upload!(io: file.tap(&:rewind).open,
|
||||
filename: file.original_filename,
|
||||
content_type: file.content_type)
|
||||
content_type: file.content_type,
|
||||
metadata:)
|
||||
|
||||
ActiveStorage::Attachment.create!(blob:, name: 'attachments', record: submitter)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user