WordPress.org

Ready to get started?Download WordPress

Forums

Windows Azure Storage for WordPress
Attachment URLs Don't Respect Directory Structure (2 posts)

  1. brandonmartinez
    Member
    Posted 5 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 5 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);

Reply

You must log in to post.

About this Plugin

About this Topic