JAC
JAC

Reputation: 1117

DropZone - Replace / in dropped filename

Uploads with a slash in the filename are problematic in a number of ways. I need to change the / to a space, or eliminate it altogether.

This would be the most obvious, and it works for any other characters I've tested with, but the / always gets through.

renameFile: function(file) {
            return file.renameFile =file.name.replace("/","");
        }

I've tried escaping it with "\/" quoted and unquoted plus several other variations. The slash always comes though.

Upvotes: 0

Views: 106

Answers (0)

Related Questions