Skip to content

Commit

Permalink
Added per upload privacy filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jawngee committed Dec 11, 2019
1 parent e5227d2 commit fd64f16
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 17 deletions.
7 changes: 7 additions & 0 deletions classes/Tools/Storage/StorageTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -2922,6 +2922,13 @@ public function processFile(
if ( !empty($forcedAcl) ) {
$privacy = $forcedAcl;
}
$privacy = apply_filters(
'media-cloud/storage/override-privacy',
$privacy,
$prefix . $bucketFilename,
trailingslashit( $upload_path ) . $filename,
$data
);

if ( $uploadFile || empty($url) ) {
Logger::info( "\tUploading {$filename} to S3." );
Expand Down
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@
],
"require" : {
"php": ">=5.6",
"imgix/imgix-php": "^1.0",
"smalot/pdfparser": "^0.13.2",
"duncan3dc/blade": ">3.3",
"fasterimage/fasterimage": "^1.1",
"monolog/monolog": "^1.23",
"google/cloud-storage": "^1.10",
"league/flysystem": "^1.0",
"ilab/ilab-aws-media-cloud-sdk": "^0.3.2",
"trntv/probe": "^1.0",
"league/glide": "^1.3",
"ilab/ilab-flysystem-aws-s3-v3": "^0.2.2",
"duncan3dc/blade": ">3.3",
"superbalist/flysystem-google-storage": "^7.1",
"google/cloud-vision": "^0.19.0",
"guzzlehttp/guzzle": "6.3.3",
"ilab/b2-sdk-php": "^1.4",
"psr/http-message-implementation": "*",
"ilab/ilab-aws-media-cloud-sdk": "^0.3.2",
"ilab/ilab-flysystem-aws-s3-v3": "^0.2.2",
"imgix/imgix-php": "^1.0",
"ivopetkov/html5-dom-document-php": "^2.2",
"league/flysystem": "^1.0",
"league/glide": "^1.3",
"mikey179/vfsstream": "*",
"monolog/monolog": "^1.23",
"psr/http-message-implementation": "*",
"ralouphie/mimey": "^2.1",
"ivopetkov/html5-dom-document-php": "^2.0",
"smalot/pdfparser": "^0.13.2",
"superbalist/flysystem-google-storage": "^7.1",
"trntv/probe": "^1.0",
"zumba/amplitude-php": "^1.0"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions ilab-media-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin URI: https://github.com/interfacelab/ilab-media-tools
Description: Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site performance and simplifies workflows.
Author: interfacelab
Version: 3.3.8
Version: 3.3.10
Author URI: http://interfacelab.io
*/
// Copyright (c) 2016 Interfacelab LLC. All rights reserved.
Expand Down Expand Up @@ -93,7 +93,7 @@
}

// Version Defines
define( 'MEDIA_CLOUD_VERSION', '3.3.8' );
define( 'MEDIA_CLOUD_VERSION', '3.3.10' );
define( 'MEDIA_CLOUD_INFO_VERSION', '1.0.0' );
// Directory defines
define( 'ILAB_TOOLS_DIR', dirname( __FILE__ ) );
Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== Media Cloud for Amazon S3, Imgix, Google Cloud Storage, DigitalOcean Spaces and more ===
Contributors: mediacloud, interfacelab
Contributors: mediacloud, interfacelab, freemius
Tags: offload, amazon, s3, imgix, uploads, google cloud storage, digital ocean spaces, wasabi, minio, media, cdn, rekognition, cloudfront, images, crop, image editing, image editor, media library, offload, offload s3, filepicker, smush, ewww, imagify, shortpixel
Requires at least: 4.4
Tested up to: 5.3
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Stable tag: 3.3.8
Stable tag: 3.3.10
Requires PHP: 5.6.4

Automatically store media on Amazon S3, Google Cloud Storage, DigitalOcean Spaces + others. Serve CSS/JS assets through CDNs. Integrate with Imgix.
Expand Down Expand Up @@ -108,7 +108,12 @@ No, I'm just one very enthusiastic customer.

== Changelog ==

= 3.3.8 =
= 3.3.10 =

* CRITICAL FIX. Previous version introduced a library that could cause issues on some systems, it has been fixed in this version. Please update ASAP.
* Added new filter, "media-cloud/storage/override-privacy" that allows you to override privacy per upload.

= 3.3.9 =

* Fix for errors on Task Manager pages caused by a library conflict with other plugins.
* When using the post editor after migrating an existing site to cloud storage, images appeared broken if the original images were deleted from the server. This is now fixed.
Expand Down

0 comments on commit fd64f16

Please sign in to comment.