Support » Plugin: WordPress Media Library Folders » Sanitizes the filename

  • Resolved Brownsugar


    It’s better to sanitize the media file name when renaming it to prevent nginx output 400 bad request when the filename has special chars.

    For example: media-library-plus/maxgalleria-media-library.php Line 3503
    $new_attachment = pathinfo($new_attachment, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR . sanitize_file_name(pathinfo($new_attachment, PATHINFO_FILENAME)) . "." . strtolower(pathinfo($new_attachment, PATHINFO_EXTENSION));

Viewing 1 replies (of 1 total)
  • Plugin Author AlanP57


    Thank you sandwich1168. We will try it out and probably include it in our next release.

Viewing 1 replies (of 1 total)
  • The topic ‘Sanitizes the filename’ is closed to new replies.