Skip to content

Commit

Permalink
fixed Azure metadata problem
Browse files Browse the repository at this point in the history
  • Loading branch information
tech-ec authored Mar 9, 2018
1 parent 5a5f275 commit f185394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Storage/GaufretteStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ protected function doUpload(PropertyMapping $mapping, UploadedFile $file, $dir,
$filesystem = $this->getFilesystem($mapping);
$path = !empty($dir) ? $dir.'/'.$name : $name;

$filesystem->write($path, file_get_contents($file->getPathname()), true);

if ($filesystem->getAdapter() instanceof MetadataSupporter) {
$filesystem->getAdapter()->setMetadata($path, ['contentType' => $file->getMimeType()]);
}

$filesystem->write($path, file_get_contents($file->getPathname()), true);
}

/**
Expand Down

0 comments on commit f185394

Please sign in to comment.