File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
app/code/Magento/Customer/Model/Metadata/Form Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,17 @@ private function getFileExtension(string $fileName): string
232
232
return pathinfo ($ fileName , PATHINFO_EXTENSION );
233
233
}
234
234
235
+ /**
236
+ * Get file basename from the file if it exists, otherwise, get from filename.
237
+ *
238
+ * @param string $fileName
239
+ * @return string
240
+ */
241
+ private function getFileBasename (string $ fileName ): string
242
+ {
243
+ return pathinfo ($ fileName , PATHINFO_BASENAME );
244
+ }
245
+
235
246
/**
236
247
* Helper function that checks if the file was uploaded.
237
248
*
@@ -248,7 +259,7 @@ protected function _isUploadedFile($filename)
248
259
}
249
260
250
261
// This case is required for file uploader UI component
251
- $ temporaryFile = FileProcessor::TMP_DIR . '/ ' . $ this ->fileProcessor -> getStat ($ filename )[ ' basename ' ] ;
262
+ $ temporaryFile = FileProcessor::TMP_DIR . '/ ' . $ this ->getFileBasename ($ filename );
252
263
if ($ this ->fileProcessor ->isExist ($ temporaryFile )) {
253
264
return true ;
254
265
}
You can’t perform that action at this time.
0 commit comments