Feature
The pdv_file element lets a submitter either upload a file or pick one from their vault. When they pick from the vault, the submission currently stores a reference to the vault item and the download controller streams the bytes from the vault.
Change the default so that picking a file from the vault downloads its bytes and writes them into a normal local managed file on the submission, handled exactly like a manual upload: a real file entity, served locally, present in exports and email attachments. Only the vault-pick path changes; manual uploads and the optional save-to-vault are untouched.
New setting
Add a "Link to the vault file" element setting, off by default, that keeps the current behavior for a vault pick: store the vault-item reference and stream the bytes from the vault on download, with no local copy.
Filename and MIME
The materialized file is named and typed from the vault, not guessed. The file-read contract returns the bytes plus the stored MIME and a server-generated filename (the item's kind plus the MIME's extension, e.g. id_card.pdf), never the owner's original filename. The cross-site read endpoint sends the MIME and filename with the bytes, and the download serves the real type, so a vault-picked file downloads as a real, typed file rather than an untyped generic name.
Issue fork pdv-3593541
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mably commentedComment #4
mably commentedComment #6
mably commented