Skip to content

Commit 348d2c2

Browse files
committed
B2B-1789: First Request For Storefront Image After Deleting Local File System Cached Images Results In Magento Placeholder Image When Using S3 -
Added review changes on plugin
1 parent 04a6527 commit 348d2c2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

app/code/Magento/RemoteStorage/Plugin/MediaStorage.php renamed to app/code/Magento/RemoteStorage/Plugin/File/Storage/SynchronizationFactory.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\RemoteStorage\Plugin;
8+
namespace Magento\RemoteStorage\Plugin\File\Storage;
99

1010
use Magento\RemoteStorage\Model\File\Storage\Synchronization;
1111
use Magento\RemoteStorage\Model\Config;
1212
use Magento\Framework\ObjectManagerInterface;
1313

1414
/**
15-
* Helps to synchronize files from remote to local file system
15+
* This is a plugin to Magento\MediaStorage\Model\File\Storage\SynchronizationFactory.
1616
*/
17-
class MediaStorage
17+
class SynchronizationFactory
1818
{
1919
/**
2020
* Object Manager instance
@@ -41,11 +41,11 @@ public function __construct(ObjectManagerInterface $objectManager, Config $confi
4141
}
4242

4343
/**
44-
* Create class instance with specified parameters
45-
*
44+
* Create remote synchronization instance
45+
* @param Synchronization $subject
4646
* @param array $data
4747
*/
48-
public function aroundCreate(array $data = [])
48+
public function beforeCreate(Synchronization $subject, array $data = [])
4949
{
5050
if ($this->config->isEnabled()) {
5151
return $this->objectManager->create(Synchronization::class, $data);

app/code/Magento/RemoteStorage/etc/di.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@
7676
</arguments>
7777
</type>
7878
<type name="Magento\MediaStorage\Model\File\Storage\SynchronizationFactory">
79-
<plugin name="remoteMedia" type="Magento\RemoteStorage\Plugin\MediaStorage" />
79+
<plugin name="remoteMediaStorageSynchronizationFactory" type="Magento\RemoteStorage\Plugin\File\Storage\SynchronizationFactory" />
8080
</type>
8181
<type name="Magento\Framework\Data\Collection\Filesystem">
82-
<arguments>
82+
<arguments>x
8383
<argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
8484
</arguments>
8585
</type>
@@ -95,7 +95,7 @@
9595
</type>
9696
<type name="Magento\Framework\Image\Adapter\AbstractAdapter">
9797
<plugin name="remoteImageFile" type="Magento\RemoteStorage\Plugin\Image" sortOrder="10"/>
98-
</type>
98+
</type>x
9999
<type name="Magento\Catalog\Model\Category\FileInfo">
100100
<arguments>
101101
<argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>

0 commit comments

Comments
 (0)