File tree 1 file changed +5
-5
lines changed
app/code/Magento/MediaStorage/Model/File/Storage
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -291,16 +291,16 @@ public function saveFile($file, $overwrite = true)
291
291
&& isset ($ file ['content ' ])
292
292
&& !empty ($ file ['content ' ])
293
293
) {
294
- try {
295
- $ filename = isset (
296
- $ file ['directory ' ]
297
- ) && !empty ($ file ['directory ' ]) ? $ file ['directory ' ] . '/ ' . $ file ['filename ' ] : $ file ['filename ' ];
294
+ $ filename = isset (
295
+ $ file ['directory ' ]
296
+ ) && !empty ($ file ['directory ' ]) ? $ file ['directory ' ] . '/ ' . $ file ['filename ' ] : $ file ['filename ' ];
298
297
298
+ try {
299
299
return $ this ->_fileUtility ->saveFile ($ filename , $ file ['content ' ], $ overwrite );
300
300
} catch (\Exception $ e ) {
301
301
$ this ->_logger ->critical ($ e );
302
302
throw new \Magento \Framework \Exception \LocalizedException (
303
- __ ('Unable to save file "%1" at "%2" ' , $ file ['filename ' ], $ file [ ' directory ' ] )
303
+ __ ('Unable to save file "%1" at "%2" ' , $ file ['filename ' ], $ filename )
304
304
);
305
305
}
306
306
} else {
You can’t perform that action at this time.
0 commit comments