What's the difference between Thumbnail linked to viewer with download and without download?

Created on 19 January 2024, over 1 year ago

Problem/Motivation

I added 2 DAM Documents via the wysiwyg. For the first one, I selected Format option: Thumbnail linked to viewer with download and the second: Thumbnail linked to viewer without download.

When I saved the node both thumbnails behaved the same. In my browsers they opened the document in a new tab. The thumbnails used the same url except that "with download" replaced a space with a dash. I checked the renderDocumentsPdfAsset and link_thumbnail and link_thumbnail_download are almost identical.
/view/pdf/abc/this-is-my-file_horizontal.pptx?t.download=true
/view/pdf/abc/this-is-my file_horizontal.pptx?t.download=true

And I get the same results if I add a document using a media entity reference field and change the Embed style.

I'm not actually sure what I expect to happen if it's linked but doesn't download. How should the 2 format options be different?

Steps to reproduce

D10.2.2
acquia_dam 1.0.11
php 8.1.3
ckeditor5
Chrome Version 120.0.6099.216 and Firefox 121.0.1

I added the Drupal media button to the ckeditor toolbar with the following config: /admin/config/content/formats/manage/full_html
Config for filter.format.full_html:

uuid: def-123
langcode: en
status: true
dependencies:
  module:
    - editor
    - media
_core:
  default_config_hash: 456etc
name: 'Full HTML'
format: full_html
weight: 2
filters:
  editor_file_reference:
    id: editor_file_reference
    provider: editor
    status: true
    weight: 11
    settings: {  }
  filter_align:
    id: filter_align
    provider: filter
    status: true
    weight: 8
    settings: {  }
  filter_caption:
    id: filter_caption
    provider: filter
    status: true
    weight: 9
    settings: {  }
  filter_html:
    id: filter_html
    provider: filter
    status: false
    weight: -10
    settings:
      allowed_html: ''
      filter_html_help: true
      filter_html_nofollow: false
  filter_htmlcorrector:
    id: filter_htmlcorrector
    provider: filter
    status: true
    weight: 10
    settings: {  }
  filter_image_lazy_load:
    id: filter_image_lazy_load
    provider: filter
    status: true
    weight: 15
    settings: {  }
  media_embed:
    id: media_embed
    provider: media
    status: true
    weight: 100
    settings:
      default_view_mode: default
      allowed_view_modes: {  }
      allowed_media_types: {  }

DAM - Documents config: /admin/structure/media/manage/acquia_dam_documents_asset/display
(this is all default)
Config for media.acquia_dam_documents_asset.default:

uuid: abc-etc
langcode: en
status: true
dependencies:
  config:
    - media.type.acquia_dam_documents_asset
  module:
    - acquia_dam
_core:
  default_config_hash: 123etc
id: media.acquia_dam_documents_asset.default
targetEntityType: media
bundle: acquia_dam_documents_asset
mode: default
content:
  acquia_dam_asset_id:
    type: acquia_dam_embed_code
    label: hidden
    settings:
      embed_style: original
    third_party_settings: {  }
    weight: 0
    region: content
hidden:
  created: true
  name: true
  search_api_excerpt: true
  thumbnail: true
  uid: true

I also compared DAM - PDF media type.
Text linked to viewer with download and Text linked to viewer without download
Text linked to viewer with download - worked like the document, when I click on it, it opens the PDF in a new tab /view/pdf/123/abc-123_v2.pdf?t.download=true
Text linked to viewer without download - My browser tried to download it, but gave me an "Insecure download blocked."

💬 Support request
Status

Active

Version

1.0

Component

Documentation

Created by

🇺🇸United States capysara

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

Comments & Activities

Production build 0.71.5 2024