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 16
16
public_path (),
17
17
],
18
18
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
+
19
30
/*
20
31
|--------------------------------------------------------------------------
21
32
| Allowed protocols for downloading
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ protected function registerPdfRenderer(): void
36
36
{
37
37
$ this ->app ->singleton ('typesetsh ' , function ($ app ) {
38
38
$ allowedDirectories = $ app ['config ' ]['typesetsh.allowed_directories ' ] ?? [];
39
+ $ baseDir = $ app ['config ' ]['typesetsh.base_dir ' ] ?? [];
39
40
$ allowProtocols = $ app ['config ' ]['typesetsh.allowed_protocols ' ] ?? [];
40
41
$ cacheDir = $ app ['config ' ]['typesetsh.cache_dir ' ] ?? null ;
41
42
$ timeout = (int )($ app ['config ' ]['typesetsh.timeout ' ] ?? 15 );
@@ -54,7 +55,7 @@ protected function registerPdfRenderer(): void
54
55
$ schemes ['file ' ] = new UriResolver \File ($ allowedDirectories );
55
56
}
56
57
57
- return new Typesetsh (new UriResolver ($ schemes ));
58
+ return new Typesetsh (new UriResolver ($ schemes, $ baseDir ));
58
59
});
59
60
60
61
$ this ->app ->singleton ('typesetsh.pdf ' , function ($ app ) {
You can’t perform that action at this time.
0 commit comments