This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,17 @@
<?php
namespace Stemcell\ProductImport\Plugin;
class UploaderPlugin
{
public function beforeSave(
\Magento\Framework\File\Uploader $subject,
$destinationFolder,
$newFileName = null
) {
// 添加更多允许的扩展名
$allowedExtensions = ['jpg', 'jpeg', 'gif', 'png', 'webp', 'bmp', 'tiff'];
$subject->setAllowedExtensions($allowedExtensions);
return [$destinationFolder, $newFileName];
}
}