• Resolved Brownsugar

    (@sandwich1168)


    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 3521
    $new_attachment = pathinfo($new_attachment, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR . sanitize_file_name(pathinfo($new_attachment, PATHINFO_FILENAME)) . "." . strtolower(pathinfo($new_attachment, PATHINFO_EXTENSION));

    • This topic was modified 6 years, 11 months ago by Brownsugar.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sanitizes the filename’ is closed to new replies.