1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Unknown length support; reports download error

This commit is contained in:
Yury Delendik 2012-08-20 17:16:04 -05:00
parent ec8fdb60fc
commit df4fadeaf5
2 changed files with 47 additions and 14 deletions

View file

@ -363,6 +363,11 @@ var PDFView = {
PDFView.progress(args.loaded / args.total);
break;
case 'complete':
if (!args.data) {
PDFView.error(mozL10n.get('loading_error', null,
'An error occurred while loading the PDF.'), e);
break;
}
PDFView.open(args.data, 0);
break;
}