WordPress.org

Forums

Windows Azure Storage for WordPress
[resolved] Attachment URLs Don't Respect Directory Structure (4 posts)

  1. brandonmartinez
    Member
    Posted 1 year ago #

    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'];

    To:

    $upload_dir_url = $wp_upload_dir['baseurl'];

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

    http://wordpress.org/plugins/windows-azure-storage/

  2. brandonmartinez
    Member
    Posted 1 year ago #

    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);

  3. Bibin Kurian
    Member
    Plugin Author

    Posted 8 months ago #

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

    Regards,
    Bibin

  4. brandonmartinez
    Member
    Posted 8 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic