XFileSharing Pro - Leaving spaces in filename and url
Leaving spaces in filename and url
Hello, I've got a problem with my script. Not really a problem but I can't figure it out how to make the change I want. I want to leave the white spaces in the filename and not replace them with underscore. Can you help me with it? Thank you in advance
-
- Posts: 94
- Joined: Jan 18, 2009 4:29 am
Re: Leaving spaces in filename and url
i think it could be hard changing, because u must change in save files function and call a file function. And i think that's need a large effort.jeyul wrote:Hello, I've got a problem with my script. Not really a problem but I can't figure it out how to make the change I want. I want to leave the white spaces in the filename and not replace them with underscore. Can you help me with it? Thank you in advance
I don't think it will be that hard ... I read a older post on the forum and the solution was editing the fs.cgi but I don't find the required field in my fs.cgi. It must have something to do with file_name_orig or filename in the fs/uploads.cgi . I know that there is function that replaces the white spaces and I think if I could manage to delete it then it should work but I can't manage to find the function so I'm waiting for a developers response
P.S. : I'm using XFilesharing pro 1.1
@Later edit :
Solved . I'll post down the solution for the ones who need it
In uploads.cgi find $fhash{file_name_orig}=~s/[^a-zA-Z0-9-_\.]/_/gs;
and replace it with $fhash{file_name_orig}=~s/[^a-zA-Z0-9-_\.]/ /gs;
*If you want another character to replace the white spaces you can add it between the slashes before gs ( / character/gs ).
P.S. : I'm using XFilesharing pro 1.1
@Later edit :
Solved . I'll post down the solution for the ones who need it
In uploads.cgi find $fhash{file_name_orig}=~s/[^a-zA-Z0-9-_\.]/_/gs;
and replace it with $fhash{file_name_orig}=~s/[^a-zA-Z0-9-_\.]/ /gs;
*If you want another character to replace the white spaces you can add it between the slashes before gs ( / character/gs ).