File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1616 public_path (),
1717 ],
1818
19+ /*
20+ |--------------------------------------------------------------------------
21+ | Base directories
22+ |--------------------------------------------------------------------------
23+ |
24+ | The base directory to use for relative paths.
25+ |
26+ */
27+
28+ 'base_dir ' => public_path (),
29+
1930 /*
2031 |--------------------------------------------------------------------------
2132 | Allowed protocols for downloading
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ protected function registerPdfRenderer(): void
3636 {
3737 $ this ->app ->singleton ('typesetsh ' , function ($ app ) {
3838 $ allowedDirectories = $ app ['config ' ]['typesetsh.allowed_directories ' ] ?? [];
39+ $ baseDir = $ app ['config ' ]['typesetsh.base_dir ' ] ?? [];
3940 $ allowProtocols = $ app ['config ' ]['typesetsh.allowed_protocols ' ] ?? [];
4041 $ cacheDir = $ app ['config ' ]['typesetsh.cache_dir ' ] ?? null ;
4142 $ timeout = (int )($ app ['config ' ]['typesetsh.timeout ' ] ?? 15 );
@@ -54,7 +55,7 @@ protected function registerPdfRenderer(): void
5455 $ schemes ['file ' ] = new UriResolver \File ($ allowedDirectories );
5556 }
5657
57- return new Typesetsh (new UriResolver ($ schemes ));
58+ return new Typesetsh (new UriResolver ($ schemes, $ baseDir ));
5859 });
5960
6061 $ this ->app ->singleton ('typesetsh.pdf ' , function ($ app ) {
You can’t perform that action at this time.
0 commit comments