News:

Support the VirtueMart project and become a member

Main Menu

Remove UTF8 characters from file names

Started by sandomatyas, December 02, 2016, 12:16:13 PM

Previous topic - Next topic

sandomatyas

My customer uploaded some products images with space and accented characters in the file name. It was stored with this name to the image directory and the #__virtuemart_medias table but there some browsers which can't handle this properly and even PHP has some difficulties with that.
Is there a way to disable using special characters in file names?

Milbo

It is more or less just some lines and an option, an hidden one would be enough
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sandomatyas



Studio 42

If you upload files with Joomla, Virtuemart or my tool VM Be Pro, the files are renamed correctly to prevent such problems.
If you upload files directly, rename your files before upload is the only safe solution.

sandomatyas

I uploaded an image to a product (Joomla 3.8.3, VM 3.2.12) via VirtueMart and the special characters are still there
https://snag.gy/FkuXTo.jpg

Studio 42

Hum, i was thinking, this are always safe.
So best, is to rename it before upload.

sandomatyas

I can rename sure but it would be better if VM could handle it. I could use a new settings option for that: would you like to use web-safe file names yes/no :)

sandomatyas

#8
Quote from: sandomatyas on January 19, 2018, 13:32:50 PM
I can rename sure but it would be better if VM could handle it. I could use a new settings option for that: would you like to use web-safe file names yes/no :)

@Milbo maybe? :/

I had to restore a backup where VM had utf8 filenames and this is what I got:
https://snag.gy/FhmAs6.jpg

I know, it's the server but there would be an option to use web-safe file names, it wouldn't be a problem.