So I have a URL as a string in a variable and I'm trying the following:
<cfimage action="read" name="myImage" source"#myUrlString#">
And I get the following error:
faultCode:Server.Processing faultString:'Unable to invoke CFC - An exception occurred while trying to read the image.' faultDetail:'File C:\Inetpub\wwwroot\my\cfc\path\"https:\my.domain.com\imagefile.jpg" does not exist.'
Clearly it's prepending the path to the .cfc file onto the URL String. How do I get cfimage to just load the image from the URL without it trying to prepend the .cfc file's path onto it?
(I've also tried ImageRead and ImageNew with exactly the same results).
Mableton, Georgia, USA
So from that error message it looks like your URL is like:
Which isn't a valid format URL. It should be like:
This may just be you putting dummy code into your question, but worth checking anyway.
Also you may need to URL encode the filepath, read this article:
Yes it was me putting dummy code into my question... Sorry...
I did figure out the problem just a few minutes ago, however.
Turns out the URL string had quotes around it. Oops...
So my URL variable contained "https://my.domain.com/imagefile.jpg" *including* the quotes... Once I removed the quotes from the string, it works.