WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. brandonmartinez
    Member
    Posted 8 months 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 8 months 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. bibinkurian
    Member
    Plugin Author

    Posted 2 weeks ago #

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

    Regards,
    Bibin

  4. brandonmartinez
    Member
    Posted 2 weeks 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.

Reply

You must log in to post.

About this Plugin

About this Topic