Forum Discussion
Hi guys,
I�m currently evaluating whether to use Quick Base to deliver a business solution and the ability to view PDFs is a must-have feature.
I managed to get the file attachment to view if it is an jpg with a rich text field containing:
"<img max-width=\"32px\" max-height=\"100px\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e46/v0\" />"
And these variables :
/iol &rand='+new Date().getTime())};">
iol <img qbu='module' src='/i/clear2x2.gif' onload="javascript:if(typeof QBU=='undefined'){QBU={};$.getScript(gReqAppDBID+'?a=dbpage&pagename=
However, when I attached a PDF and use a second text field with
var text URL = "https://docs.google.com/gview?url="; & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e46/v0&embedded=true";
"<embed src=\"" & $URL & "\" height=\"650\" width=\"900\">"
It just renders to this on the page!!!
<embed src="https://docs.google.com/gview?url=https://msip.quickbase.com/up/bnfd9ydpg/a/r5/e46/v0&embedded=t...; height="650" width="900">
Also, if I copy this url into a browser it just renders HTML.
Can anyone help?
- ChadBrandmire7 years agoQrew Assistant CaptainAre the file attachment field properties set to allow open access?
- MarkGoodwin7 years agoQrew Member
Thanks - I set allow open access to true and the https://docs.google.com/gview?url=https://msip.quickbase.com/up/bnfd9ydpg/a/r5/e46/v0&embedded=t... worked fine.
However, for this solution the attachment needs to be private.
So, I think my problem is that the script for the "<embed" is being rendered to text on the page rather than being treated as a script.
- ChadBrandmire7 years agoQrew Assistant CaptainThe problem you're having is that this solution relies on using google docs, which is why you need to allow access outside of quickbase.
If you can find a way to use a document viewer internally with your app that would solve your privacy problem. Unfortunately outside of finding a third party app I don't know of a way to do that
If you figure out a way, please share - MarkGoodwin7 years agoQrew Member
Thanks Chad,
Also, can you explain why the embed is rendering to text rather than as an embed tag
- ChadBrandmire7 years agoQrew Assistant Captainthe embed tag is doing what its supposed to be doing. An embed tag is a container that displays what information it receives from a plug-in or external source.
So in the case where you are seeing that html feedback (text), you are seeing what google docs spit back when it was sent the attachment with no access.