angular-filemanager
angular-filemanager copied to clipboard
Special web-unsafe characters will not be escaped during upload.
By accident, I uploaded a picture with a special character (like "–", a longer hyphen, see http://unicode-table.com/en/2013/) in it.
This resulted in a file, which was not able to be previewed, nor deleted. Is there a place where this could be encoded?
Hi,
I had similiar problems with some local characters but so I guess I need to take a look whether it happens on the frontend or in the bridge.
Hi.. @jrondorf this happens with php (ftp bridge) or php-local bridge?
Regards
Hello @durasj !
I tested in php bridge and works well, maybe your bridge have a encoding issue with some characters.
Did you try to use some utf8_encode(), mb_convert_encoding() functions to parse filename?
Regards
Hi, with PHP Local Bridge.
Hi guys,
unfortunately I can't look at it in the near future as I have too much work. Please, feel free to look at it.
Thank you very much
If you are able to point me to a place in the source code, I can have a look. This is an important functionality, which I need. Thanks.
Hi @jrondorf,
here it is: https://github.com/joni2back/angular-filemanager/blob/master/bridges/php-local/LocalBridge/FileManagerApi.php#L345
Also manual page for chmod and it's comments could be useful: http://php.net/manual/en/function.chmod.php
Thanks
@durasj Seems your links and response its for another issue :)
@joni2back you are absolutely right. Sorry about that, I've been quite busy lately.
I am afraid I can't point you in this case as it will probably require changes all over the code.
So isn't there just one place where you are uploading files, where the filename can be checked? Of course in addition also the download/viewing of files has to be adapted, but upload of new files is more important.
My code is pretty straightforward. All the important logic is happening in the FileManagerApi.php file within *Action methods like uploadAction
@durasj if the filename having the Captial letters then script removes the capital letters.
Hi @yogeshdalavi77
I think this issue was resolved by implementing normalizeName. Please check the linked method to see whether it causes the issue. I am not the author.
I think the correct behavior should be lowercasing them, but feel free to play with it and let me know.