Generating an URL access for a PDF stored in an entity

Generating an URL access for a PDF stored in an entity

  

Hello everyone,

I'm having a problem integrating the pdfJS Viewer plugin, since it requires an URL for the file to display and my file is stored in a Entity with attributes Name(Text), Content(Binary).

Is there a way to generate the acess URL to pass to the pdfJS Viewer?

Best Regards,

Filipe

Solution

Hi Filipe,

Just create a page, and in the preparation, finish it with a Download node, passing as the content your PDF binary. You can use input parameters to define which file to download.

Than you can use this URL with the component.

Cheers.

Solution