Copy link to clipboard
Copied
I have a cloud share drive recently assigned to my project, and I was able to copy a number of PDF files into it. I can use Windows Explorer to navigate to that drive and bring up any PDF file with ease -- double click, view in Acrobat, no problem.
I can use CFDIRECTORY to list the contents of the directory, and I can use FileExists and CFFILE to test and grab a copy of the file, no sweat.
I put a text file in the directory, and I can pull that up with:
<cfheader name="Content-disposition" value="attachment;filename=filenamehere.txt">
<cfcontent reset="true" type="text/plain" file="file:///\\sharedDirectoryHere\filenamehere.txt">
I put a GIF in place and <image> displayed it easily.
I can use the following code pair to view PDF's on another project's share with no issue, PDF pops right up...
<cfheader name="Content-disposition" value="attachment;filename=filenamehere.pdf">
<cfcontent reset="true" type="application/pdf" file="file:///\\otherSharedDirectoryHere\filenamehere.pdf">
... but if I try to read and display a PDF on my shared directory, it tells me the file is missing or corrupt and will not display it.
Your thoughts, please?
Resolution?
There are two shares in question. It does appear that permissions are the culprit. A number of groups with permissions were removed and others were aligned properly by assigning the ColdFusion service to the permissions group responsible for the share, and the ability to serve up a PDF now works on one of the two shares.
The other share is not working, but that is likely due to the permissions being production, not development, and there appears to be no good way to properly and fully
...Copy link to clipboard
Copied
Thank you, Dave.
First, to log onto that machine in this company would require an act of God and likely an act of Congress (not entirely kidding given the fact that we're in this permissions situation due to congressional action). There is no way that is going to happen, much less changing the user account. If I could do that, if I had that much freedom here, I could have finished this project (4 months now and counting) in the first day (or at least the first week) and been on to something else, saving this company a ton of money. I was brought in to migrate from CF 8/10 to CF 2016 but in these 4+ months I _might_ have 8 hours -- cumulative -- of CF Programming under my belt, and a lot of that was actually review of legacy code for compliance. Not what I was told I'd be doing.
For the CF Admin password -- I will remember that! Well...I'll try to remember that. That could have solved this problem so much more quickly, although one never knows - they may have some auto-monitoring/psw reset program in place that would have thwarted my efforts because I didn't use official channels.
Nothing but fun here. Hope you're having a blast where you are! 🙂