If the file is one you have a path to then use the path instead.

If it is truly something accessed via a URL only, then maybe use a <cfhttp>
to try and get it, within a <cftry>/<cfcatch> block of course, to determine
if the URL is valid or not. If you create a UDF that does that all (kind of
a URLExists() function) then you can definitely use that in any <cfif>
statement.

--- Ben



 

-----Original Message-----
From: Chad McCue [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 11:12 AM
To: CF-Talk
Subject: Re: Using FileExists

Is there any way to do some type of fileExists with a URL. Or anyway to
check for a file in an email?

----- Original Message -----
From: "Ben Forta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Tuesday, December 06, 2005 11:09 AM
Subject: RE: Using FileExists


> FileExists() needs a file path, not a URL.
>
>
>
> -----Original Message-----
> From: Chad McCue [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 06, 2005 11:08 AM
> To: CF-Talk
> Subject: Using FileExists
>
> I am sending an email out and need to check if the image is actually found
> on the server, if not show a default image. This is what I am trying to
do.
>
> Property Images is a Virtual Directory set up in IIS
>
> <CFIF
>
FileExists("http://www.somewebaddress.com/PropertyImages/Adirectory/AnotherD
> irecotry/ImageFileName.jpg") > Show the Image <CFELSE> Default Image
</CFIF>
>
> The problem is the FileExists never seems to work, my email always shows
the
> default image.
>
>
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226204
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to