mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 06:42:32 -05:00
store multiple submitter results
This commit is contained in:
1 parent
279409ad41
commit
28429c1167
36 files changed
+391
-241
No files matched your search
@@ -5,14 +5,14 @@ module Api
|
||||
skip_before_action :authenticate_user!
|
||||
|
||||
def create
|
||||
submission = Submission.find_by!(slug: params[:submission_slug]) unless current_account
|
||||
submitter = Submitter.find_by!(slug: params[:submitter_slug]) unless current_account
|
||||
|
||||
blob = ActiveStorage::Blob.find_signed(params[:blob_signed_id])
|
||||
|
||||
attachment = ActiveStorage::Attachment.create!(
|
||||
blob:,
|
||||
name: params[:name],
|
||||
record: submission || current_account
|
||||
record: submitter || current_account
|
||||
)
|
||||
|
||||
render json: attachment.as_json(only: %i[uuid], methods: %i[url filename content_type])
|
||||
|
||||
Reference in new issue
Block a user