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

  1. pbsrg
    Posted 4 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??



  2. Dion Hulse
    Lead Developer
    Plugin Author

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


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Add From Server
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic