Skip to main content
Topic: roblems when uploading files classic 2.6.7 (Read 2157 times) previous topic - next topic

roblems when uploading files classic 2.6.7

There are problems when uploading files with “OriginalFilename”. If the file name has spaces, the download link is broken by coupling with part of the link on the current page. It only works well if the name has no spaces ...

Re: roblems when uploading files classic 2.6.7

Reply #1
Hello,
Probably you gave up from this product and i can't blame you if you did so but, if you did not gave up yet, you can resolve this issue by editing  libs/Uploader.php and by replacing line 377 with this oneL

$string = str_replace("{{file_name}}", preg_replace("![^a-z0-9]+!i", "-", $file['name']), $string);

This will replace any special character - including spaces, with dash lines.
I had to check files one by one to find this solution.
Good luck ;-)

 

Re: roblems when uploading files classic 2.6.7

Reply #2
Hello,
Probably you gave up from this product and i can't blame you if you did so but, if you did not gave up yet, you can resolve this issue by editing  libs/Uploader.php and by replacing line 377 with this oneL

$string = str_replace("{{file_name}}", preg_replace("![^a-z0-9]+!i", "-", $file['name']), $string);

This will replace any special character - including spaces, with dash lines.
I had to check files one by one to find this solution.
Good luck ;-)
Thanks oldi,
is there a way to set this change permanently, so that it will not be overwrite when updating the page?
TIA
tony

Re: roblems when uploading files classic 2.6.7

Reply #3
Hello,
Probably you gave up from this product and i can't blame you if you did so but, if you did not gave up yet, you can resolve this issue by editing  libs/Uploader.php and by replacing line 377 with this oneL

$string = str_replace("{{file_name}}", preg_replace("![^a-z0-9]+!i", "-", $file['name']), $string);

This will replace any special character - including spaces, with dash lines.
I had to check files one by one to find this solution.
Good luck ;-)
Thanks oldi,
is there a way to set this change permanently, so that it will not be overwrite when updating the page?
TIA
tony
Ok, I found a solution:
I edited the file Uploader.php located in
C:\Program Files (x86)\PHPRad Classic\Components\Bootstrap-4\systemframework\libs
and deleted the one in my app (located in myappwebsite/libs/Uploader.php).
When I republish my app the correct file is uploaded.
HTH
Tony