Skip to content

Commit bf706a9

Browse files
committed
Added detection for silhouette studio files (.studio3)
1 parent eac00eb commit bf706a9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/SoftCreatR/MimeDetector/MimeDetector.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,14 @@ public function getFileType(): array
931931
];
932932
}
933933

934+
// unfortunately, this format doesn't have a proper mime type, but it's worth detecting
935+
if ($this->checkForBytes([0x73, 0x69, 0x6c, 0x68, 0x6f, 0x75, 0x65, 0x74, 0x74, 0x65, 0x30, 0x35])) {
936+
return [
937+
'ext' => 'studio3',
938+
'mime' => 'application/octet-stream'
939+
];
940+
}
941+
934942
// this class is intended to detect binary files, only. But there's nothing wrong in
935943
// trying to detect text files aswell.
936944
if ($this->checkString('<?xml ')) {

0 commit comments

Comments
 (0)