mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
A little safer and/or more dangerous way of checking content type
This commit is contained in:
parent
a02bb2f5c9
commit
6869271d54
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ public struct PageScrapePayload {
|
|||
|
||||
// If the content type was specified and we know its PDF, use that
|
||||
// otherwise fallback to using file extensions.
|
||||
if let contentType = contentType, contentType == "application/pdf" {
|
||||
if let contentType = contentType, contentType.contains("pdf") {
|
||||
self.contentType = .pdf
|
||||
} else {
|
||||
self.contentType = url.hasSuffix(".pdf") ? .pdf : .html
|
||||
|
|
|
|||
Loading…
Reference in a new issue