Pleas keep in mind that SPAM will be deleted instantly
File upload (any file type)
- dipankar
- Offline
Less
More
- Posts: 7
- Thank you received: 0
8 years 7 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
i tried this one but not working
Please Log in to join the conversation.
- d.hoeschen
-
- Offline
Less
More
- Posts: 1222
- Thank you received: 226
8 years 7 months ago #4594
by d.hoeschen
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
If you want to load your files directly by name or ID and not from Database.
If the ID of your dataset is 1 it would link to
/images/pdf/doc_1.pdf
Please look at the demo database!
Replied by d.hoeschen 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
Code:
<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
Code:
<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: d.hoeschen, joest
