Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Help! Prohibited Filename - Illegal Characters
  • I am a newbie and I love uploadify but I'm having a small problem. When visitors are uploading files many of the file names have apostrophes in them (e.g. "I'll Be There"). For some reason when I go to retrieve them the apostrophe ' gets replaced with a forward slash \ and I can't download them with my FTP client (Transmit) because it says the Filename is Prohibited. I try to rename them but it won't let me do that either.

    So I've been going into my hosting control panel to rename them so I can download them.

    Is there a way to preserve the apostrophes or just strip them out completely before uploadify writes them?

    What would the code be? And where would I add or replace the code?

    I don't know PHP or Javascript so please be patient and/or maybe include links to any references that I might need to study.

    Thanks!
  • Here is my hack for this


    'onSelect' : function(event,ID,fileObj) {
    if(fileObj.name.search("'") >= 0 || fileObj.name.search('"') >= 0 || fileObj.name.search('/') >= 0 || fileObj.name.search("\'") >= 0 ){
    alert('The file "'+fileObj.name+'" was not uploaded because it has at least one invalid character.');
    return false;
    }else{
    return true;
    }

    }