文件获取filesystem.php

 1 <?php
 2 
 3 return [
 4     // 默认磁盘
 5     'default' => env('filesystem.driver', 'local'),
 6     // 磁盘列表
 7     'disks'   => [
 8         'local'  => [
 9             'type' => 'local',
10             'root' => app()->getRuntimePath() . 'storage',
11         ],
12 
13         //本地上传文件
14         'public' => [
15             // 磁盘类型
16             'type'       => 'local',
17             // 磁盘路径
18             'root'       => app()->getRootPath() . 'public/upload',
19             // 磁盘路径对应的外部URL路径
20             'url'        => '/upload',
21             // 可见性
22             'visibility' => 'public',
23         ],
24 
25         // 图片管理
26         'image' => [
27             // 磁盘类型
28             'type'       => 'native',
29             // 磁盘路径
30             'root'       => app()->getRootPath() . 'public/upload/image',
31             // 磁盘路径对应的外部URL路径
32             'url'        => '/upload/image',
33             // 可见性
34             'visibility' => 'public',
35         ],
36 
37         //图片缩略图
38         'thumb' => [
39             // 磁盘类型
40             'type'       => 'native',
41             // 磁盘路径
42             'root'       => app()->getRootPath() . 'public/upload/thumb',
43             // 磁盘路径对应的外部URL路径
44             'url'        => '/upload/thumb',
45             // 可见性
46             'visibility' => 'public',
47         ],
48 
49         // 静态模板
50         'html' => [
51             // 磁盘类型
52             'type'       => 'local',
53             // 磁盘路径
54             'root'       => app()->getRootPath() . 'html',
55         ],
56 
57         // 备份全站
58         'web' => [
59             // 磁盘类型
60             'type'       => 'local',
61             // 磁盘路径
62             'root'       => app()->getRootPath(),
63         ],
64 
65         // 模板上传
66         'template' => [
67             // 磁盘类型
68             'type'       => 'local',
69             // 磁盘路径
70             'root'       => app()->getRootPath() . 'app/home/view',
71         ],
72 
73         // 模板静态资源
74         'template_static' => [
75             // 磁盘类型
76             'type'       => 'local',
77             'web_path' => '/static/web/',
78             // 磁盘路径
79             'root'       => app()->getRootPath() . 'public/static/web',
80         ],
81 
82         // 下载文件
83         'download' => [
84             // 磁盘类型
85             'type'       => 'local',
86             // 磁盘路径
87             'root'       => app()->getRootPath(). 'download',
88         ],
89 
90         // oss
91         'oss' => [
92             'type'         => 'oss',
93         ]
94         // 更多的磁盘配置信息
95     ],
96 ];

 

posted @ 2022-04-13 10:34  糖粿  阅读(66)  评论(0编辑  收藏  举报