WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. pbsrg
    Member
    Posted 2 years 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
    WordPress Dev
    Plugin Author

    Posted 2 years 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 2 years 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 2 years ago #

    +1

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic