File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,12 @@ define([
563
563
return model . mimetype === 'text/html'
564
564
|| includes_extension ( model . path , viewable_extensions ) ;
565
565
} ;
566
+
567
+ // Files like PDF that should be opened using `/files` prefix
568
+ NotebookList . prototype . _is_pdflike = function ( model ) {
569
+ var pdflike_extensions = [ 'pdf' ] ;
570
+ return includes_extension ( model . path , pdflike_extensions ) ;
571
+ } ;
566
572
567
573
/**
568
574
* Handles when any row selector checkbox is toggled.
@@ -732,6 +738,10 @@ define([
732
738
{
733
739
uri_prefix = 'view' ;
734
740
}
741
+ if ( model . type === 'file' && this . _is_pdflike ( model ) )
742
+ {
743
+ uri_prefix = 'files' ;
744
+ }
735
745
if ( model . type === 'file' && this . _is_notebook ( model ) )
736
746
{
737
747
uri_prefix = 'notebooks' ;
You can’t perform that action at this time.
0 commit comments