Avatar of WestCoast_BC
Flag for Canada

asked on 

How do I use imagenew if the file name contains spaces

I am trying to use the Codlfusion function imageNew. It works for me if the filename does not contain any spaces. If it does I get an error. For example:
<cfset thisImageside=imageNew("/path_to_file/filename.jpg")>

Open in new window

works but
<cfset thisImageside=imageNew("/path_to_file/file name with space.jpg")>

Open in new window

gives me an error, I get an Access denied error. I have tried using urlEncodeFormat for the file name but then I get the error that the file does not exist.

If anyone can shed some light regarding this problem I would very much appreciate it.
Web DevelopmentColdFusion LanguageWeb Development Software

Avatar of undefined
Last Comment

8/22/2022 - Mon