Wrong upload path for remainning path
-
Hi,
Since version 4.3.1 – the path used for the upload of the remaining images is not correct. It works when the month of the post is equal to the current month but not if the post has been created prior to the current month.
In function windows_azure_storage_wp_generate_attachment_metadata (windows-azure-storage.php). The upload folder path is based on the current month + current year – where it should be based on the month + year of the post.
To fix the issue, you could for instance replace:
$upload_folder_path = trailingslashit( ltrim( $upload_dir[‘reldir’] . $upload_dir[‘subdir’], ‘/’ ) );
by
$upload_folder_path = trailingslashit( ltrim( $upload_dir[‘reldir’] . substr( $upload_file_name, 0, strrpos( $upload_file_name, DIRECTORY_SEPARATOR ) ), ‘/’ ) );
Hope this help.
- The topic ‘Wrong upload path for remainning path’ is closed to new replies.