kaizendeveloper/pimcore-bundle-azure-blob-sync
最新稳定版本:v1.3.3
Composer 安装命令:
composer require kaizendeveloper/pimcore-bundle-azure-blob-sync
包简介
Fork of Rohit Raj Verma's project in order to correct some PSR4 errors shown on some Pimcore installs. This bundle use to sync all records Assets from Pimcore to Azure Blob Storage
README 文档
README
Fork of rohitrajv5/pimcore-bundle-azure-blob-sync on his:
Pimcore Azure Bundle is use to push Pimcore Assets on Microsoft Azure Blob Storage
Try to fix: PS4 compliance issues
Compatible with Pimcore > v5.6. Tested on Pimcore 6
Installation
Install with Composer
composer require kaizendeveloper/pimcore-bundle-azure-blob-sync
Execute following commands
bin/console pimcore:bundle:enable AzurePimcoreBundle bin/console assets:install web
Plugin will look like this
Changes in Pimcore Admin
-
Goto Pimcore Admin -> Settings -> Azure Blog Container Settings
-
Enter your credentials and save.
Configurations & Settings
Add following code in "app/constant.php"
try { $file = __DIR__ . '/../var/config/azure.php'; if (file_exists($file)) { $azureConfig = include($file); } } catch (\Exception $e) { $azureConfig = []; } $azureEnabled = FALSE; if (isset($azureConfig['enableAzure']) && $azureConfig['enableAzure']) { $azureEnabled = TRUE; define("AZURE_ACCOUNT_URL", $azureConfig['accountUrl']); define("AZURE_ACCOUNT_NAME", $azureConfig['accountName']); define("AZURE_ACCOUNT_KEY", $azureConfig['accountKey']); define("AZURE_CONTAINER", $azureConfig['container']); $azureFileWrapperPrefix = "blob://" . AZURE_CONTAINER; // do NOT change define("PIMCORE_ASSET_DIRECTORY", $azureFileWrapperPrefix . "/assets"); //define("PIMCORE_TEMPORARY_DIRECTORY", $azureFileWrapperPrefix . "/tmp"); //constants for reference in the views //define("PIMCORE_TRANSFORMED_ASSET_URL", AZURE_ACCOUNT_URL . "/" . AZURE_CONTAINER . "/assets"); // the following paths should be private! define("PIMCORE_VERSION_DIRECTORY", $azureFileWrapperPrefix . "/versions"); //define("PIMCORE_RECYCLEBIN_DIRECTORY", $azureFileWrapperPrefix . "/recyclebin"); //define("PIMCORE_LOG_MAIL_PERMANENT", $azureFileWrapperPrefix . "/email"); //define("PIMCORE_LOG_FILEOBJECT_DIRECTORY", $azureFileWrapperPrefix . "/fileobjects"); } define("ENABLE_AZURE",$azureEnabled);
Uncomment option, Which you want to sync on Azure Blob Storage.
Add following code constant in "app/startup.php"
use AzurePimcoreBundle\AzureBlobStorage\StreamWrapper; if (ENABLE_AZURE) { $accountUrl = AZURE_ACCOUNT_URL; $accountName = AZURE_ACCOUNT_NAME; $accountKey = AZURE_ACCOUNT_KEY; $connectionString = "DefaultEndpointsProtocol=https;AccountName=" . $accountName . ";AccountKey=" . $accountKey; $container = AZURE_CONTAINER; $blobClient = \MicrosoftAzure\Storage\Blob\BlobRestProxy::createBlobService($connectionString); StreamWrapper::register($blobClient, 'blob'); \Pimcore\File::setContext(stream_context_create([ 'blob' => ['seekable' => true] ])); }
License
GPL-3.0+
统计信息
- 总下载量: 37
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2021-09-30