You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I use this code
$sampleContent = $objectManager->create(\Magento\Downloadable\Api\Data\File\ContentInterfaceFactory::class)->create();
$sampleContent->setFileData(
@codingStandardsIgnoreLine
base64_encode(file_get_contents( '/var/www/html/jellyfish_1_3.pdf'))
);
$sampleContent->setName('jellyfish_1_3.pdf');
$sampleContent->setType('application/octet-stream');
I get the following error:
PHP Fatal error: Uncaught Magento\Framework\Exception\RuntimeException: Type Error occurred when creating object: Magento\MediaGalleryIntegration\Plugin\SaveImageInformation, Argument 6 passed to Magento\MediaGalleryIntegration\Plugin\SaveImageInformation::__construct() must be of the type array, null given, called in /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121 in /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:131
Hello,
how can i use this module from an external script in php?
Thank you
The text was updated successfully, but these errors were encountered: