Dropzone element overwrites potential metadata and libraries added by other modules

Created on 11 August 2022, over 2 years ago
Updated 9 March 2023, over 1 year ago

I'm using DropzoneJS 2.6 in webform (with module Webform DropzoneJS )

Drupal 9.4.0

Previews are not shown when editing a submission.

However, the images upload just fine. If you add more photos while editing, they will be added to the existing ones. But when editing submission, they will not be shown again.

Has anyone encountered this problem? Is it possible that the problem is in the version of DropzoneJS library?

🐛 Bug report
Status

Needs review

Version

2.6

Component

User interface

Created by

🇷🇺Russia kazah

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs review almost 2 years ago
  • 🇷🇺Russia kazah

    For those who need to show thumbnails in preview (for already uploaded images):

    1. use this patch:

    https://git.drupalcode.org/project/webform_dropzonejs/-/merge_requests/3/diffs

    2.
    Navigate to /webform_dropzonejs/src/Plugin/WebformElement/WebformDropzonejs.php

    Declare your style, i.e. thumbnail: $style = \Drupal\image\Entity\ImageStyle::load('thumbnail');

    Replace 'path' => $file->getFileUri()), to 'path' => \Drupal::service('file_url_generator')->transformRelative($style->buildUrl($file->getFileUri())),

Production build 0.71.5 2024