Skip to content

Commit b6d3061

Browse files
Fixed #5052
1 parent 62922d5 commit b6d3061

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG-v3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
### Fixed
99
- Fixed a bug where updating a draft might delete content on other sites in a multisite setup on certain PHP versions. ([#5048](https://github.com/craftcms/cms/issues/5048))
10+
- Fixed a bug where mime type was not being set correctly when uploading files. ([#5052](https://github.com/craftcms/cms/issues/5052))
1011

1112
## 3.3.8 - 2019-10-09
1213

src/elements/Asset.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,9 @@ private function _relocateFile()
15261526
}
15271527

15281528
// Upload the file to the new location
1529-
$newVolume->createFileByStream($newPath, $stream, []);
1529+
$newVolume->createFileByStream($newPath, $stream, [
1530+
'mimetype' => FileHelper::getMimeType($tempPath)
1531+
]);
15301532

15311533
// Rackspace will disconnect the stream automatically
15321534
if (is_resource($stream)) {

0 commit comments

Comments
 (0)