Hello, is there any simple solution for preventing using whitespaces in files which users upload?
If not, please give me any suggestions how can I block files with whitespaces in names. Which script should I modify? Maybe a trigger in database?
Best regards
Rafal
Prevent use whitespaces in files which users upload
- fafnir1990
- Phoca Newbie
- Posts: 6
- Joined: 23 Dec 2015, 10:03
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Prevent use whitespaces in files which users upload
Hi, didn't test it so I cannot give any clue advice, but before upload to the server, you should e.g. str_replace(' ', '_', $file); the file.
Upload functions you will find here:
administrator/components/com_phocadownload/libraries/phocadownload/file/fileupload.php
See the variable $file
Jan
Upload functions you will find here:
administrator/components/com_phocadownload/libraries/phocadownload/file/fileupload.php
See the variable $file
Jan
If you find Phoca extensions useful, please support the project
- fafnir1990
- Phoca Newbie
- Posts: 6
- Joined: 23 Dec 2015, 10:03
Re: Prevent use whitespaces in files which users upload
Jan, thank you very much for your help!