[Owncloud] sanitize filenames

lebowski at corvus.uberspace.de lebowski at corvus.uberspace.de
Thu Mar 7 21:27:48 UTC 2013


Hi,

i want to use ownCloud together with another webapplication. For this, 
filenames only should contain letters, _, -, + and numbers, no spaces 
and so on.

Looking arround in /apps/files i see, that i can reach this by 
modifying the isFileNameValid-function in js/files.js for files and 
folders come from the 'New'-Button. For Drag&Drop uploaded files, i've 
to modify the getUniqueName-Function at the end of files.js  and in the 
same way the ajax/upload.php arround line 52.

My question is, how i can achive this while using webdav? It would be 
enough, if i could send a message to the user, if the filename is not 
valid. I think i can avoid uploading adding some code to the 
file_put_contents- and rename-function in filsystemview.php. But is it 
possible to send a message to a webdav-client?

Has someone a better idea for this problem?


Thanks, Martin



More information about the Owncloud mailing list