You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

164 lines
8.0 KiB

  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  9. <preference for="Magento\RemoteStorage\Driver\Adapter\Cache\CacheInterface" type="Magento\RemoteStorage\Driver\Adapter\Cache\Generic"/>
  10. <preference for="Magento\RemoteStorage\Driver\Adapter\CachedAdapterInterface" type="Magento\RemoteStorage\Driver\Adapter\CachedAdapter"/>
  11. <preference for="Magento\RemoteStorage\Driver\Adapter\MetadataProviderInterface" type="Magento\RemoteStorage\Driver\Adapter\MetadataProvider"/>
  12. <preference for="Magento\RemoteStorage\Driver\Adapter\MetadataProviderFactoryInterface" type="Magento\RemoteStorage\Driver\Adapter\MetadataProviderFactory"/>
  13. <preference for="Magento\Framework\Filesystem\DriverPool" type="Magento\RemoteStorage\Driver\DriverPool"/>
  14. <preference for="Magento\Framework\File\Uploader" type="Magento\RemoteStorage\Model\File\Uploader"/>
  15. <virtualType name="remoteWriteFactory" type="Magento\Framework\Filesystem\Directory\WriteFactory">
  16. <arguments>
  17. <argument name="driverPool" xsi:type="object">Magento\RemoteStorage\Driver\DriverPool</argument>
  18. </arguments>
  19. </virtualType>
  20. <virtualType name="remoteReadFactory" type="Magento\Framework\Filesystem\Directory\ReadFactory">
  21. <arguments>
  22. <argument name="driverPool" xsi:type="object">Magento\RemoteStorage\Driver\DriverPool</argument>
  23. </arguments>
  24. </virtualType>
  25. <type name="Magento\RemoteStorage\Filesystem">
  26. <arguments>
  27. <argument name="writeFactory" xsi:type="object">
  28. Magento\RemoteStorage\Model\Filesystem\Directory\WriteFactory
  29. </argument>
  30. <argument name="readFactory" xsi:type="object">remoteReadFactory</argument>
  31. </arguments>
  32. </type>
  33. <virtualType name="customRemoteFilesystem" type="Magento\RemoteStorage\Filesystem">
  34. <arguments>
  35. <argument name="directoryCodes" xsi:type="array">
  36. <item name="media" xsi:type="const">Magento\Framework\App\Filesystem\DirectoryList::MEDIA</item>
  37. <item name="var_import_export" xsi:type="const">Magento\Framework\App\Filesystem\DirectoryList::VAR_IMPORT_EXPORT</item>
  38. </argument>
  39. </arguments>
  40. </virtualType>
  41. <virtualType name="fullRemoteFilesystem" type="Magento\RemoteStorage\Filesystem" />
  42. <virtualType name="stdFilesystem" type="Magento\Framework\Filesystem" />
  43. <preference for="Magento\Framework\Filesystem" type="customRemoteFilesystem"/>
  44. <type name="Magento\Framework\Filesystem\Directory\TargetDirectory">
  45. <arguments>
  46. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  47. <argument name="driverCode" xsi:type="const">Magento\RemoteStorage\Driver\DriverPool::REMOTE</argument>
  48. </arguments>
  49. </type>
  50. <type name="Magento\Sitemap\Model\Sitemap">
  51. <arguments>
  52. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  53. </arguments>
  54. </type>
  55. <type name="Magento\Sitemap\Controller\Adminhtml\Sitemap\Save">
  56. <arguments>
  57. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  58. </arguments>
  59. </type>
  60. <type name="Magento\Sitemap\Block\Adminhtml\Grid\Renderer\Link">
  61. <arguments>
  62. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  63. </arguments>
  64. </type>
  65. <type name="Magento\Sitemap\Controller\Adminhtml\Sitemap\Delete">
  66. <arguments>
  67. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  68. </arguments>
  69. </type>
  70. <type name="Magento\Framework\Console\CommandListInterface">
  71. <arguments>
  72. <argument name="commands" xsi:type="array">
  73. <item name="remoteStorageSync" xsi:type="object">Magento\RemoteStorage\Console\Command\RemoteStorageSynchronizeCommand</item>
  74. </argument>
  75. </arguments>
  76. </type>
  77. <type name="Magento\Framework\App\MaintenanceMode">
  78. <arguments>
  79. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  80. </arguments>
  81. </type>
  82. <type name="Magento\MediaStorage\Model\File\Storage\SynchronizationFactory">
  83. <plugin name="remoteMediaStorageSynchronizationFactory" type="Magento\RemoteStorage\Plugin\File\Storage\SynchronizationFactory" />
  84. </type>
  85. <type name="Magento\MediaGalleryMetadata\Model\IptcEmbed">
  86. <plugin name="remoteIptcEmbed" type="Magento\RemoteStorage\Plugin\MediaGalleryMetadata\IptcEmbed" />
  87. </type>
  88. <type name="Magento\MediaGalleryMetadata\Model\ExifReader">
  89. <plugin name="remoteExifReader" type="Magento\RemoteStorage\Plugin\MediaGalleryMetadata\ExifReader" />
  90. </type>
  91. <type name="Magento\MediaGallerySynchronization\Model\Filesystem\GetFileInfo">
  92. <plugin name="remoteGetFileInfo" type="Magento\RemoteStorage\Plugin\Filesystem\GetFileInfo" />
  93. </type>
  94. <type name="Magento\Framework\Data\Collection\Filesystem">
  95. <arguments>
  96. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  97. </arguments>
  98. </type>
  99. <type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
  100. <arguments>
  101. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  102. </arguments>
  103. </type>
  104. <type name="Magento\Framework\File\Mime">
  105. <arguments>
  106. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  107. </arguments>
  108. </type>
  109. <type name="Magento\Framework\File\Name">
  110. <arguments>
  111. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  112. </arguments>
  113. </type>
  114. <type name="Magento\Catalog\Model\Product\Option\Type\File\ExistingValidate">
  115. <plugin name="remoteValidatorInfo" type="Magento\RemoteStorage\Plugin\ExistingValidate" sortOrder="10"/>
  116. </type>
  117. <type name="Magento\Framework\Image\Adapter\AbstractAdapter">
  118. <plugin name="remoteImageFile" type="Magento\RemoteStorage\Plugin\Image" sortOrder="10"/>
  119. </type>
  120. <type name="Magento\Framework\Archive\Zip">
  121. <plugin name="remoteZipArchive" type="Magento\RemoteStorage\Plugin\Zip" sortOrder="10"/>
  122. </type>
  123. <type name="Magento\Catalog\Model\Category\FileInfo">
  124. <arguments>
  125. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  126. </arguments>
  127. </type>
  128. <type name="Magento\ImportExport\Model\Import">
  129. <arguments>
  130. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  131. </arguments>
  132. </type>
  133. <type name="Magento\ImportExport\Model\Import\ImageDirectoryBaseProvider">
  134. <arguments>
  135. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  136. </arguments>
  137. </type>
  138. <type name="Magento\ImportExport\Helper\Report">
  139. <arguments>
  140. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  141. </arguments>
  142. </type>
  143. <type name="Magento\CatalogImportExport\Model\Import\Product">
  144. <arguments>
  145. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  146. </arguments>
  147. </type>
  148. <type name="Magento\CatalogImportExport\Model\Import\Uploader">
  149. <arguments>
  150. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  151. </arguments>
  152. </type>
  153. <type name="Magento\DownloadableImportExport\Helper\Uploader">
  154. <arguments>
  155. <argument name="filesystem" xsi:type="object">fullRemoteFilesystem</argument>
  156. </arguments>
  157. </type>
  158. <type name="Magento\RemoteStorage\Model\Synchronizer">
  159. <arguments>
  160. <argument name="filesystem" xsi:type="object">customRemoteFilesystem</argument>
  161. </arguments>
  162. </type>
  163. </config>