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

Command icon 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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

mably’s picture

Issue summary: View changes

  • mably committed fa4d7483 on 1.x
    feat: #3593541 pdv_file: materialize a vault-picked file into a local...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.