mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 1918301 - Don't display pdfs in pdf.js coming from a multipart response r=valentin, a=dsmith
Original Revision: https://phabricator.services.mozilla.com/D222122 Differential Revision: https://phabricator.services.mozilla.com/D222965
This commit is contained in:
parent
051dcb8006
commit
6e8199d485
@ -982,6 +982,13 @@ PdfStreamConverter.prototype = {
|
||||
},
|
||||
|
||||
getConvertedType(aFromType, aChannel) {
|
||||
if (aChannel instanceof Ci.nsIMultiPartChannel) {
|
||||
throw new Components.Exception(
|
||||
"PDF.js doesn't support multipart responses.",
|
||||
Cr.NS_ERROR_NOT_IMPLEMENTED
|
||||
);
|
||||
}
|
||||
|
||||
const HTML = "text/html";
|
||||
let channelURI = aChannel?.URI;
|
||||
// We can be invoked for application/octet-stream; check if we want the
|
||||
|
Loading…
Reference in New Issue
Block a user