Problem/Motivation

drupalSettings.webformDropzoneJs[dropzoneId].files contains an array of existing files in a Dropzone widget. In order to make files removable, let's make the file id available. You can then save the file id in a hidden input field and remove them from the submission on save.

Proposed resolution

Make the file id available in drupalSettings.webformDropzoneJs[dropzoneId].files

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new829 bytes

Attached patch makes the file id available in drupalSettings.webformDropzoneJs[dropzoneId].files

chrisroane’s picture

Status: Needs review » Fixed

I included this change. But more importantly, I added code that will remove the files properly when the dropzone field is used and is loaded with already uploaded files.

chrisroane’s picture

Status: Fixed » Closed (fixed)