comparison vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
102 $psrUploadedFile->moveTo($temporaryPath); 102 $psrUploadedFile->moveTo($temporaryPath);
103 103
104 $clientFileName = $psrUploadedFile->getClientFilename(); 104 $clientFileName = $psrUploadedFile->getClientFilename();
105 } 105 }
106 106
107 if (class_exists('Symfony\Component\HttpFoundation\HeaderUtils')) {
108 // Symfony 4.1+
109 return new UploadedFile(
110 $temporaryPath,
111 null === $clientFileName ? '' : $clientFileName,
112 $psrUploadedFile->getClientMediaType(),
113 $psrUploadedFile->getError(),
114 true
115 );
116 }
117
107 return new UploadedFile( 118 return new UploadedFile(
108 $temporaryPath, 119 $temporaryPath,
109 null === $clientFileName ? '' : $clientFileName, 120 null === $clientFileName ? '' : $clientFileName,
110 $psrUploadedFile->getClientMediaType(), 121 $psrUploadedFile->getClientMediaType(),
111 $psrUploadedFile->getSize(), 122 $psrUploadedFile->getSize(),