10up / windows-azure-storage

Use the Microsoft Azure Storage service to host your website's media files.
https://wordpress.org/plugins/windows-azure-storage/
BSD 2-Clause "Simplified" License
58 stars 46 forks source link

fix issue with yearmonth folders option checked #232

Open hugosolar opened 1 week ago

hugosolar commented 1 week ago

Description of the Change

There's an issue when Wordpress doesn't use the year/month file structure in the uploads folders, when trying to upload intermediate images to the container, $upload_folder_path is wrongly set to / ./ and that causes the image doesn't get uploaded and by consequence, just the original file is getting uploaded correctly. By checking if the option is disabled we can set $upload_folder_path to / which fixes the issue

This fix closes #229

How to test the Change

Changelog Entry

Fixed - Bug fix Fixed issue with unchecking year/month option under Settings > Media causes intermediate images not being uploaded to the container

Credits

Props @hugosolar, @glowmedia (for testing and reporting)

Checklist: