This content has been marked as final. Show 12 replies
Assuming you have already eliminated the obvious causes:
1) Directory/file path is invalid
2) CF does _not_ have permission to write information to that directory
Check your patch level. There was an image hotfix to fix issues with locked files
And how do you verify if CF has permission to write in that directory?
I solved this issue. Now what about when the source of your image is random? I need to upload images from multiple locations not just the local directory where the cfm files reside.
So what was the issue?
> I need to upload images from multiple locations not just the local directory where the cfm files reside.
I assume you mean use cffile to upload files to different locations? Just change the "destination" path to point to the desired directory. The same applies if you are using cfimage. You just change the "destination" path.
I solved that issue already. Thanks.
I am using CFImage. The problem now is my source file. My program only lets me select image files from the same location where my cfm files are. If I upload a file let's say from my pictures, the program breaks and it says that it can't find the file in location: location_where_cfm_files_are_located. So it only lets me pick images that are in the same folder as my CFM files.
Another way to put my question is: DO I always have to specify the source directory of my picture or I can select an image from anywhere in my network?
when in doubt - check the docs!
from <cfimage> cfml reference:
source = "absolute pathname|pathname relative to the web
- URL of the source image; for example,
- Absolute pathname or a pathname relative to the web root;
for example: "c:\images\logo.jpg"
- ColdFusion image variable containing another image, BLOB,
or byte array; for example, "#myImage#"
- Base64 string; for example,
I always check the docs and by the way they SUCK. That being said, thank you for your response but I know that already. I have 8 servers in my network and as of now, I have to specify the path in my code of where the image is coming from (SOURCE). I want to make my program that the image is read by CFIMage regardless of the location of the picture. So far I have to code EVERYWHERE where my source file is: source="//webdata/development/webimages/image.jpg" I dont want to havr to do that! Because I want to select images from anywhere in my network.
> I can select an image from anywhere in my network?
The default install of ColdFusion usually only has permissions to read
and write to directories on the server on which it is installed.
If you want it to have permissions to resources on other servers you
have to configure it to run as a user that has those permissions. How
you do this depends on whether you are using Windows or Unix servers.
> Because I want to select images from anywhere in
> my network.
hmm... how do you expect <cfimage> to *guess* where exactly it should
get the image from? :)
there's no way cf can 'guess' where myimage.gif is located - that's what
the SOURCE attribute is for: to tell it where to fetch the image from.
by default it will look in the same location the page with <cfimage> tag
is located in. that's why SOURCE is a REQUIRED attribute.
or do you mean that your same codebase on different servers should be
accessing a different, server-specific, images location?
you could set an application-scope var...
or maybe better just create a cf mapping to the location of your images...
and use that as SOURCE value
sorry if i still have guessed your question wrong - maybe you should try
to explain your network setup and how and where your application runs a
I will check all my permissions and such on CF Admin. All my servers are Windows except one that we use to test some functionality. I will post on here how I make out with this situation.
Thank you! You did not guess wrong. I thought there was a way to tell teh source attribute to automatically pick up the directory the image was coming from. Fair enough. That's all I needed to know.