Sanitizes the filename
-
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));
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sanitizes the filename’ is closed to new replies.