MrGregWaugh
Forum Replies Created
-
The issue seems to be in
\Windows_Azure_Helper::wp_upload_dir()
which returns the current YYYY/MM instead of the one matching the post. As a quick hack (because this was causing us a big issue with a large content import) this works:In the
function windows_azure_storage_wp_generate_attachment_metadata()
, before line 389, add the following:$upload_dir['subdir'] = pathinfo( $upload_file_name, PATHINFO_DIRNAME );
Or just apply this patch:
--- a/html/wp-content/plugins/windows-azure-storage/windows-azure-storage.php +++ b/html/wp-content/plugins/windows-azure-storage/windows-azure-storage.php @@ -385,6 +385,9 @@ function windows_azure_storage_wp_generate_attachment_metadata( $data, $post_id $upload_path = trailingslashit( ltrim( $upload_dir['reldir'], '/' ) ); $file_path = ltrim( $upload_path, '/' ) . $upload_file_name; + // HACK to fix not-current-month bug + $upload_dir['subdir'] = pathinfo( $upload_file_name, PATHINFO_DIRNAME ); + // Upload path for remaining files $upload_folder_path = trailingslashit( ltrim( $upload_dir['reldir'] . $upload_dir['subdir'], '/' ) );
This doesn’t address the root cause of the problem, but should workaround the issue until a better fix can be applied.
Bump. Same issue here.
- This reply was modified 3 years, 9 months ago by MrGregWaugh.
Forum: Plugins
In reply to: [Microsoft Azure Storage for WordPress] 0 byte files@wlanni, are you certain you’ve updated to the 4.0.2 version? That included the previously mentioned fix. I’ve updated it across multiple sites and has completely solved the issue for me.
Forum: Plugins
In reply to: [Microsoft Azure Storage for WordPress] 0 byte filesSame fix worked for me too!
For me it was working fine when using the main Media manager panel, but when uploading from within a post or selecting featured image is when it would fail.
Thanks @zeeman86 for the hotfix!
Forum: Plugins
In reply to: [Instant Articles for WP] plugin auto publishing to production?Is the question more that this behavior is able to be changed when using the RSS method of importing, but when using the API-based publishing on this plugin there is no option to have articles post as drafts?
If the latter, then I’d agree that this would be a good feature, considering that we had that option when using the older RSS method. For some sites, we give the editorial staff the ability to choose which stories to go IA before they are published, so this is a needed feature for us.
Poking around at the code, line 120 of class-instant-articles-publisher.php, this seems to be hard-coded to publish if not in development mode.
if ( $dev_mode ) { $published = false; } else { // Any publish status other than 'publish' means draft for the Instant Article. $published = true; }
Devs, is it possible to add a preference option or even a WP filter to this to allow publishers to control whether or not it will be published automatically?
Many thanks.
Forum: Plugins
In reply to: [Microsoft Azure Storage for WordPress] Headers for uploaded blobsYes, this was included in the last release of the plugin. Just use this code in your functions.php or wherever and this will be added to all subsequent uploads.
function azure_storage_blob_properties( $headers ) { $headers['x-ms-blob-cache-control'] = 'public, max-age=604800'; return $headers; } add_filter( 'windows_azure_storage_blob_properties' , 'azure_storage_blob_properties' );
- This reply was modified 7 years, 10 months ago by MrGregWaugh.
yes!!