× Pleas keep in mind that SPAM will be deleted instantly

File upload (any file type)

More
6 years 6 months ago #4590 by dipankar
Replied by dipankar on topic File upload (any file type)
<img src="media/images/joodb/test{joodb field|pdf_content}"/>
i tried this one but not working

Please Log in to join the conversation.

More
6 years 6 months ago #4594 by Dirk
Replied by Dirk on topic File upload (any file type)

dipankar wrote: <img src="media/images/joodb/test{joodb field|pdf_content}"/>
i tried this one but not working


This would try to load a file from media/images/joodb/
But you don`want to display a image. You want to load a database blob field containing a PDF-document. You can not display PDFs within a html file!!!

use
<a href="{joodb field|pdf_content}" target="_blank">view document</a>

If you want to load your files directly by name or ID and not from Database.
  • Create a folder in /images eg. /images/pdf
  • Upload your pdfs using the unique names or IDs of the corresponding dataset
  • for example 1.pdf, 2.pdf, 3.pdf ... x.pdf
  • Insert a anchor in your template with the path to the files and the field representing the filename
<a href="/images/pdf/doc_{joodb field|id}.pdf" target="_blank">view document</a>

If the ID of your dataset is 1 it would link to
/images/pdf/doc_1.pdf

Please look at the demo database!

Please Log in to join the conversation.

Moderators: Dirkjoest