Skip to content

Commit

Permalink
Slides allow Keynote upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 8, 2023
1 parent a05f054 commit 0b3d68b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/mimetype.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Mimetype {
const TAR_TYPE = "application/x-tar";
const ZIP_TYPE = "application/zip";
const RAR_TYPE = "application/x-rar-compressed";
const KEYNOTE_TYPE = "application/vnd.apple.keynote";

const FLAG_INLINE = 1;
const FLAG_UTF8 = 2;
Expand All @@ -40,6 +41,7 @@ class Mimetype {
self::PDF_TYPE => [".pdf", "PDF", self::FLAG_INLINE | self::FLAG_REQUIRE_SNIFF],
self::PS_TYPE => [".ps", "PostScript", self::FLAG_COMPRESSIBLE],
self::PPT_TYPE => [".ppt", "PowerPoint", self::FLAG_INCOMPRESSIBLE, "application/mspowerpoint", "application/powerpoint", "application/x-mspowerpoint"],
self::KEYNOTE_TYPE => [".key", "Keynote", self::FLAG_INCOMPRESSIBLE, "application/x-iwork-keynote-sffkey"],
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =>
[".pptx", "PowerPoint", self::FLAG_INCOMPRESSIBLE],
"video/mp4" => [".mp4", null, self::FLAG_INCOMPRESSIBLE],
Expand Down
3 changes: 2 additions & 1 deletion src/paperoption.php
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,8 @@ function mimetypes() {
} else if ($this->type === "slides") {
return [Mimetype::checked_lookup(".pdf"),
Mimetype::checked_lookup(".ppt"),
Mimetype::checked_lookup(".pptx")];
Mimetype::checked_lookup(".pptx"),
Mimetype::checked_lookup(".key")];
} else if ($this->type === "video") {
return [Mimetype::checked_lookup(".mp4"),
Mimetype::checked_lookup(".avi")];
Expand Down

0 comments on commit 0b3d68b

Please sign in to comment.