Forums

Add From Server
Replace spaces in filenames with dashes (4 posts)

  1. pbsrg
    Member
    Posted 8 months ago #

    Hello i love this plugin except one thing...
    When a user uploads a file with spaces, the spaces are not replaced with dashes as they are when using the WordPress uploader.
    I use Add From Server to upload videos to use with the JW Player Plugin. But JW Player does not allow spaces in filenames: "http://example.com/uploads/file name here.jpg" automatically turns into "http://example.com/uploads/filenamehere.jpg"

    WordPress has a function to replace spaces with dashes in file names: http://codex.wordpress.org/Function_Reference/sanitize_file_name

    is there anyway to incorporate this function into this plugin??

    Thanks.

    http://wordpress.org/extend/plugins/add-from-server/

  2. Dion Hulse (@dd32)
    WordPress Dev
    Posted 8 months ago #

    Thanks for your report pbsrg, I'll have a look into what is happening, AFAIK, I'm using the same file sanitization that the WordPress uploader uses, but given what you suggest, I might've missed something!

  3. pbsrg
    Member
    Posted 8 months ago #

    Thanks Dion, I appreciate you looking into this.

    Also after reading my first post, I think I wasn't completely clear on this: I upload these files with an FTP software. When I add them to my media library via Add From Server, it would be nice if the spaces and special characters were removed from the file name at that time.

  4. Abcmoteur
    Member
    Posted 6 months ago #

    +1

Reply

You must log in to post.

About this Plugin

About this Topic