Hi, guys!
I have a page where some attachments (they can be image or pdf) are listed and there is an option to download each one, but I was requested to make this files visible in a modal, so that the user will avoid downloading it every time, because sometimes they just want to visualize it quickly.
Currently I already have a modal and I'm trying to display the attachments into it whit list records, but it appears that binary data is not allowed on this component.
Does someone know how to achieve this?
Regards,
Eduardo
Hi Eduardo,
See the example .OML in attachment.
Result (show PDF and image in modal):
Regards.
database image:
Thank you, Agno! I'll study and try it.
Hi, Agno!
I'm trying to make it work, but it seems that I don't have this PDF_JS component, and I couldn't find it in the Forge. It looks like some parts are missing. I've searched for PDF_JS, but didn't find.
Best regards,
Hello,
You do not need to use the component, you can use the iframe directly from the tools tab
New version without PDF_JS in attachment.
If you still can't, send me your .OML for check.
Hi, Agno.
Unfortunatelly, no. Iframe seems not to be available to me.
Is there something to do with using a web block? I can't use a web screen, because the structure was previously built in this web block. I was meant only to improve it with this visualization.
Ps.: There is an screenshot with a search by Iframe.
Right, it's possible use in webBlock and screen,
try get the Iframe in your references:
or
Got it, Agno!
It's working!
Thank you so much!
I'm glad I could help.
Cheers!
Hello Eduardo,
Possibly this component can help you.
Paulo Z
Thank you, Paulo, but I forgot to mention that it is a web app. Sorry.
@Eduardo Coelho The question might be already answered, but I suggest don't store the files directly in the database, it's not bad if you only storing a few files or depending on the requirements, but if the requirement is store a lot of files, thousands of it, then it will be get bad in the future.
Try to save it on cloud storage like S3
- Generate a public path then save it to your database/table
Please read this about storing files on the database.
Cheers, mate.
Hi, Jovvy!
I'll hand on this to my superior. Many thanks!