Created
June 12, 2022 17:56
-
-
Save Sental/b4a713cf0e98d633acaca42dfb0e21cb to your computer and use it in GitHub Desktop.
Create Media Gallery Folders in Root Media Folder for Magento 2.4.3-p1 and later releases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> | |
<default> | |
<system> | |
<media_storage_configuration> | |
<allowed_resources> | |
<media_gallery_image_folders> | |
<!-- new "Media Gallery Allowed" folders --> | |
<folder_one>folder_one</folder_one> | |
<reddit>reddit</reddit> | |
<secrets>secrets</secrets> | |
</media_gallery_image_folders> | |
</allowed_resources> | |
</media_storage_configuration> | |
</system> | |
</default> | |
</config> | |
<!-- file location | |
app/code/Vendor/Module/etc/config.xml --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> | |
<module name="Vendor_Module" /> | |
</config> | |
<!-- file location | |
app/code/Vendor/Module/etc/module.xml --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Standard Registration Module | |
\Magento\Framework\Component\ComponentRegistrar::register( | |
\Magento\Framework\Component\ComponentRegistrar::MODULE, | |
'Vendor_Module', | |
__DIR__ | |
); | |
//file location | |
//app/code/Vendor/Module/etc/module.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment