Adding the ability to open in the browser instead of downloading
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3176870-open-in-browser.patch | 2.48 KB | nicodh |
| #7 | 3176870-7.patch | 3.19 KB | Pooja Ganjage |
| #5 | 3176870-5.patch | 2.77 KB | Pooja Ganjage |
| #2 | entity-pdf.png | 22.89 KB | mahseri |
| #2 | entity_pdf-open-in-browser-3176870.patch | 2.71 KB | mahseri |
Comments
Comment #2
mahseri commentedComment #3
weseze commentedWhy do we need a token replacement here:?
$openinbrowser = \Drupal::token()->replace($config->get('openinbrowser'), [ $entity->getEntityTypeId() => $entity ], ['langcode' => $langcode]);I would also like to see an update hook to set the default value.
Comment #4
weseze commentedComment #5
Pooja Ganjage commentedHi,
I am creating a patch for including an update hook for set default value.
Please review the patch.
Thanks.
Comment #6
Pooja Ganjage commentedComment #7
Pooja Ganjage commentedUploaded new patch.
Comment #8
weseze commentedQuestion form #3 remains unanswered. I think it is incorrect. Either it needs to be corrected, or it needs some documentation.
Comment #9
nicodh commentedHi
I rerolled a patch, without token replacement, and handling default setting or query parameter to open pdf directly in browser.
Comment #10
weseze commentedLooks good, just some small nitpicks. Will fix those myself.
Comment #12
weseze commentedComitted and released in 2.0.4.