Hi
I have problems with files names when someone uploads a image with spaces or something other special characters.
When the site try display image is not found. but if you copy the full path in the url bar is there. I am using CMSMS Smart Image Toolkit.
The question is its posbile to rename the file as been uploaded?
This an example of a file is not working
https://www.site.org.uk/uploads/images/blog/Grey, Paint, World Art Day Instagram Story (2).png.
I don't have any control over people what they upload files even I tell they need to rename files first.
Cheers
Andrew
uploading images with spaces & special characters
-
- Forum Members
- Posts: 155
- Joined: Thu Aug 20, 2020 10:49 pm
Re: uploading images with spaces & special characters
Have you tried using |replace:'':'' ..?
-
- Forum Members
- Posts: 155
- Joined: Thu Aug 20, 2020 10:49 pm
Re: uploading images with spaces & special characters
How and where would you use that? The files needs to renamed as been uploaded at the backend.
Re: uploading images with spaces & special characters
|replace can be applied to the variable you give SmartImage. It's not ideal but can help a bit. There's currently no function for renaming files on upload. It's possible you could create a UDT for that and attach it to the onFileUploaded event, but that would come with some problems as they'd likely still be selecting the poorly named file.
I did notice that SmartImage has an issue with spaces in file names that CGSmartImage didn't. I'll probably file a BR on that after doing a bit more testing.
I did notice that SmartImage has an issue with spaces in file names that CGSmartImage didn't. I'll probably file a BR on that after doing a bit more testing.
Not getting the answer you need? CMSMS support options