Check for application/pdf as a substring and not as a full string for Content-Type and metadata in order to determine downloaded file type
This commit is contained in:
parent
89a5408c2d
commit
1f6e0ecdc8
|
@ -599,7 +599,11 @@ namespace gourou
|
||||||
|
|
||||||
std::string rightsStr = item->getRights();
|
std::string rightsStr = item->getRights();
|
||||||
|
|
||||||
if (headers.count("Content-Type") && headers["Content-Type"] == "application/pdf")
|
if (item->getMetadata("format").find("application/pdf") != std::string::npos)
|
||||||
|
res = PDF;
|
||||||
|
|
||||||
|
if (headers.count("Content-Type") &&
|
||||||
|
headers["Content-Type"].find("application/pdf") != std::string::npos)
|
||||||
res = PDF;
|
res = PDF;
|
||||||
|
|
||||||
if (res == EPUB)
|
if (res == EPUB)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user