Skip to content

Commit

Permalink
MAGETWO-64902: [GitHub][PR] bug #8277 fixing bug with https downloadi…
Browse files Browse the repository at this point in the history
…ng. #8278
  • Loading branch information
Oleksii Korshenko committed Feb 22, 2017
1 parent 49486c1 commit 49fb152
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/code/Magento/CatalogImportExport/Model/Import/Uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ class Uploader extends \Magento\MediaStorage\Model\File\Uploader
/**
* HTTP scheme
* used to compare against the filename and select the proper DriverPool adapter
* @var string
*/
const HTTP_SCHEME = 'http://';

/**
* HTTPS scheme
* used to compare against the filename and select the proper DriverPool adapter
*/
const HTTPS_SCHEME = 'https://';
private $httpScheme = 'http://';

/**
* Temp directory.
Expand Down Expand Up @@ -160,7 +155,7 @@ public function move($fileName, $renameFileOff = false)
if (preg_match('/\bhttps?:\/\//i', $fileName, $matches)) {
$url = str_replace($matches[0], '', $fileName);

if ($matches[0] === self::HTTP_SCHEME) {
if ($matches[0] === $this->httpScheme) {
$read = $this->_readFactory->create($url, DriverPool::HTTP);
} else {
$read = $this->_readFactory->create($url, DriverPool::HTTPS);
Expand Down

0 comments on commit 49fb152

Please sign in to comment.