Support » Plugin: Windows Azure Storage for WordPress » Attachment URLs Don't Respect Directory Structure

  • Resolved brandonmartinez


    On saving a post, the windows-azure-storage.php->getUpdatedUploadUrl function is stripping away my date naming (e.g. 2013/11/myfilename.jpg) even though the blob name is properly generated and saved. I changed this line:

    $upload_dir_url = $wp_upload_dir['url'];


    $upload_dir_url = $wp_upload_dir['baseurl'];

    And everything seems to be working fine. Was that expected behavior?

Viewing 3 replies - 1 through 3 (of 3 total)
  • brandonmartinez


    Diff for my change below. Also, is there anyway to become a contributor?

    Index: windows-azure-storage.php
    — windows-azure-storage.php (revision 808274)
    +++ windows-azure-storage.php (working copy)
    @@ -360,7 +360,7 @@
    function getUpdatedUploadUrl($url)
    $wp_upload_dir = wp_upload_dir();
    – $upload_dir_url = $wp_upload_dir[‘url’];
    + $upload_dir_url = $wp_upload_dir[‘baseurl’];
    $storage_url_prefix = WindowsAzureStorageUtil::getStorageUrlPrefix();

    return str_replace($upload_dir_url, $storage_url_prefix, $url);

    Plugin Author Bibin Kurian


    Thank you for reporting this bug. This fix is included in the v2.1


    Thank you for putting out a fix; I’ll give that a try.

    Is this codebase open source at all? I’d love to become a contributor.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Attachment URLs Don't Respect Directory Structure’ is closed to new replies.