File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
app/code/Magento/Catalog/Model/Webapi/Product/Option/Type/File
dev/tests/integration/testsuite/Magento/Catalog/Model/Webapi/Product/Option/Type/File Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,12 @@ public function processFileContent(ImageContentInterface $imageContent)
63
63
{
64
64
$ filePath = $ this ->saveFile ($ imageContent );
65
65
66
- $ directory = $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA );
67
- $ fileAbsolutePath = $ directory ->getAbsolutePath ($ filePath );
68
- $ fileContent = $ directory ->readFile ($ filePath );
66
+ $ mediaDirectory = $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA );
67
+ $ fileAbsolutePath = $ mediaDirectory ->getAbsolutePath ($ filePath );
68
+ $ fileContent = $ mediaDirectory ->readFile ($ filePath );
69
69
$ fileHash = hash ('sha256 ' , $ fileContent );
70
70
$ imageSize = getimagesizefromstring ($ fileContent );
71
- $ stat = $ directory ->stat ($ fileAbsolutePath );
71
+ $ stat = $ mediaDirectory ->stat ($ fileAbsolutePath );
72
72
$ result = [
73
73
'type ' => $ imageContent ->getType (),
74
74
'title ' => $ imageContent ->getName (),
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ public function testProcessFileContent($pathConfig)
35
35
'size ' => 212 ,
36
36
'width ' => 10 ,
37
37
'height ' => 10 ,
38
+ 'secret_key ' => 'bc9577055da436b9c116 ' ,
38
39
];
39
40
$ imageContent ->setName ('my_file ' );
40
41
$ imageContent ->setType ('image/png ' );
You can’t perform that action at this time.
0 commit comments