fix: extract file descriptor when items have nested 'file' key (#7343)#7389
Merged
vitormattos merged 2 commits intomainfrom Apr 3, 2026
Merged
fix: extract file descriptor when items have nested 'file' key (#7343)#7389vitormattos merged 2 commits intomainfrom
vitormattos merged 2 commits intomainfrom
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When the frontend sends multiple files via 'Choose from Files',
each item in the files array has the shape:
{ file: { path: '...' }, name: 'filename' }
processFileData() was passing the whole item as 'file' to
getNodeFromData(), creating a double-nested file.file.path
structure that getNodeFromData() cannot resolve, triggering
the 'No file source provided' exception.
Fix: extract fileData['file'] if present, otherwise fall back
to using fileData itself as the descriptor.
Fixes #7343
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
This was referenced Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7343 — "Unable to add multiples files when choosing PDFs from Files"
Root cause
When the user selects multiple PDFs via Choose from Files, the frontend sends each item in the
filesarray as:{ "file": { "path": "/foo.pdf" }, "name": "foo" }RequestSignatureService::processFileData()was forwarding the entire item as the'file'key toFileService::getNodeFromData():This made
$data['file'] = ['file' => ['path' => '...'], 'name' => '...']. SincegetNodeFromData()looks for$data['file']['path'](one level deep), it fell through togetContentFromData()which threw "No file source provided".Fix
Extract the inner file descriptor: use
$fileData['file']when present, otherwise fall back to$fileDataitself:This preserves backward compatibility: callers that already pass a bare file descriptor (
['path' => '...']) are unaffected.Testing
testSaveEnvelopeExtractsFileDescriptorFromNestedFilesArrayItemsthat verifiesgetNodeFromDatareceives the inner descriptor (without the double-nested wrapper).