Skip to content

file_list file download button not downloading file #1130

Description

@cggit

When uploading a PDF or Doc as a field type of "file_list" the resulting Download button from (Download/Remove) opens a media modal instead of downloading.

My fix is

.on( 'click', '.cmb-attach-list li, .cmb2-media-status .img-status img, .cmb2-media-status .file-status > span', cmb.handleFileClick )
to
.on( 'click', '.cmb2-media-status .img-status, .cmb2-media-status .file-status > span', cmb.handleFileClick )

and

CMB2/js/cmb2.js

Line 220 in 4bc8e98

var $el = $( this );
to
var $el = $( this ).hasClass('cmb2-media-item') ? $(this) : $(this).closest('.cmb2-media-item');

Can someone else confirm the problem and solution?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo