Skip to content

Commit

Permalink
support PowerPoint files in Convert functions
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxin01 authored Jul 1, 2020
1 parent c4a9e3d commit 963655a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func MimeTypeByExtension(filename string) string {
return "application/vnd.apple.pages"
case ".pdf":
return "application/pdf"
case ".pptx":
return "application/vnd.openxmlformats-officedocument.presentationml.presentation"
case ".rtf":
return "application/rtf"
case ".xml":
Expand Down Expand Up @@ -67,6 +69,9 @@ func Convert(r io.Reader, mimeType string, readability bool) (*Response, error)
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
body, meta, err = ConvertDocx(r)

case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
body, meta, err = ConvertPptx(r)

case "application/vnd.oasis.opendocument.text":
body, meta, err = ConvertODT(r)

Expand Down

0 comments on commit 963655a

Please sign in to comment.