CFpdf and CFcontent shows filepath and filename in browser
thanks past on cf questions...
i've developed upload application (logged in secure environment) users uploads pdf outside of root, moves , renames file , cfpdf protects file password. part of upload process inserts variables in sql database such catagory, subcatagory, filename, etc. cffile move puts file inside root have security framework. no problem this.
i have cfm page populated (dynamically) links pdf files. these links contain url handlers pass filepath , filename. when user clicks link, carried index.cfm has security framework , within page have cfpdf link pdf file (and sets password) , cfcontent loading pdf file in browser. of works fine, should.
however... because cfpdf sets filepath/filename source , destination , passes on cfcontent tag -- filepath , filename shown in browser address bar naming download file same http address (albeit underscores) if user saves file. savvy can figure out actual filepath , filename , go directly file in browser. they'd still have type in password view file i'd rather not have filepath exposed this.
without having create copy of original , rename file, there way change shown in browser address , in download filename? @ point there may many pdf files uploaded , stored on site. i'd rather not have 2 copies of each file on server - original , 1 renamed...
i've googled , googled , can't find answer anywhere on this. pointing me in right direction here.
- e
finally figured out...
since file exists on server, there's no need use cfpdf , cfcontent serve pdf.
when pdf link clicked, user directed page has security framework there redirect pdf on server. have pdf password protected. pdf opens in browser and, if saved, saved file name instead of whole url+filename.
learning work cf , pdfs through cfdocument , cfpdf lately has been frustratingly fun.(!) guess overkill in trying above when needed direct link file itself.
hope else...
- e
More discussions in ColdFusion
adobe
Comments
Post a Comment