如何使用Uploader工厂在magento 2中上传自定义图片?

时间:2019-02-04 07:38:21

标签: php magento magento2

我想将图像上传到自定义文件夹和数据库中,我正在使用上载器工厂库,但是在添加该图像时,我遇到了下面提到的错误。

  

命名空间声明语句必须是第一个语句,否则   在脚本中的任何声明调用之后   /home/mysitename/public_html/app/code/Cmsmart/Marketplace/Controller/Account/CreatePost.php   在第3行

public function __construct(
       Context $context,
       Session $customerSession,
       ScopeConfigInterface $scopeConfig,
       StoreManagerInterface $storeManager,
       AccountManagementInterface $accountManagement,
       Address $addressHelper,
       UrlFactory $urlFactory,
       FormFactory $formFactory,
       SubscriberFactory $subscriberFactory,
       RegionInterfaceFactory $regionDataFactory,
       AddressInterfaceFactory $addressDataFactory,
       CustomerInterfaceFactory $customerDataFactory,
       CustomerUrl $customerUrl,
       Registration $registration,
       Escaper $escaper,
       CustomerExtractor $customerExtractor,
       DataObjectHelper $dataObjectHelper,
       AccountRedirect $accountRedirect,
       \Cmsmart\Marketplace\Helper\Data $marketplaceHelperData,
      \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory,
       \Magento\Framework\File\UploaderFactory $uploaderFactory
)

0 个答案:

没有答案