Skip to content

Commit 1d67a23

Browse files
committed
Merge branch 'ACP2E-1862' of https://github.com/magento-l3/magento2ce into PR-05242023
2 parents 812391d + 4cd9d13 commit 1d67a23

File tree

1 file changed

+7
-3
lines changed
  • app/code/Magento/Customer/Model/Metadata/Form

1 file changed

+7
-3
lines changed

app/code/Magento/Customer/Model/Metadata/Form/File.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
class File extends AbstractData
2525
{
26+
public const UPLOADED_FILE_SUFFIX = '_uploaded';
27+
2628
/**
2729
* Validator for check not protected extensions
2830
*
@@ -59,7 +61,8 @@ class File extends AbstractData
5961

6062
/**
6163
* @var FileProcessorFactory
62-
* @deprecated 101.0.0
64+
* @deprecated 101.0.0 Call fileProcessor directly from code
65+
* @see $this->fileProcessor
6366
*/
6467
protected $fileProcessorFactory;
6568

@@ -126,7 +129,7 @@ public function extractValue(\Magento\Framework\App\RequestInterface $request)
126129
$attrCode = $this->getAttribute()->getAttributeCode();
127130

128131
// phpcs:disable Magento2.Security.Superglobal
129-
$uploadedFile = $request->getParam($attrCode . '_uploaded');
132+
$uploadedFile = $request->getParam($attrCode . static::UPLOADED_FILE_SUFFIX);
130133
if ($uploadedFile) {
131134
$value = $uploadedFile;
132135
} elseif ($this->_requestScope || !isset($_FILES[$attrCode])) {
@@ -424,7 +427,8 @@ public function outputValue($format = \Magento\Customer\Model\Metadata\ElementFa
424427
* Get file processor
425428
*
426429
* @return FileProcessor
427-
* @deprecated 100.1.3
430+
* @deprecated 100.1.3 we don’t use such approach anymore. Call fileProcessor directly
431+
* @see $this->fileProcessor
428432
*/
429433
protected function getFileProcessor()
430434
{

0 commit comments

Comments
 (0)