Welcome, Guest
Username: Password: Remember me
Pleas keep in mind that SPAM will be deleted instantly
  • Page:
  • 1
  • 2

TOPIC: File upload (any file type)

File upload (any file type) 2 years 10 months ago #4590

  • dipankar
  • dipankar's Avatar
  • Offline
  • Posts: 7
  • Thank you received: 0
<img src="media/images/joodb/test{joodb field|pdf_content}"/>
i tried this one but not working

Please Log in or Create an account to join the conversation.

File upload (any file type) 2 years 10 months ago #4594

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1112
  • Karma: 21
  • Thank you received: 202

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 or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: Dirkjoest