Skip to content

Commit 573594d

Browse files
committed
docs: update configuration document
1 parent 17c3858 commit 573594d

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

docs/config.md

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
## Routing:
44

5-
| Key | Type | Description |
6-
|----------------------|---------|--------------------------------------------------------------------------------------------------------------|
7-
| use\_package\_routes | boolean | Use routes from package or not. If false, you will need to define routes to all controllers of this package. |
8-
| middlewares | array | Middlewares to be applied to default routes. For laravel 5.1 and before, remove 'web' from the array. |
9-
| url_prefix | string | The url prefix to this package. Change it if necessary. |
5+
### use\_package\_routes
6+
7+
* type: `boolean`
8+
* default: `true`
9+
10+
Use default routes or not. You will need to define routes to all controllers of this package if this is set to `false`.
1011

1112

1213
## Multi-User Mode:
@@ -51,16 +52,44 @@ If you want to customize client folders:
5152

5253
All users can upload and manage files within shared folders. Set to `false` to turn this feature off.
5354

54-
## Working Directory:
55-
56-
| Key | Type | Description |
57-
|----------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
58-
| base_directory | string | Which folder to store files in project, fill in 'public', 'resources', 'storage' and so on. Does not support path relative path like `../public_html` or `public/upload/user/`. |
59-
| images\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
60-
| files\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
61-
| shared\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
62-
| thumb\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
6355

56+
## Folder Categories
57+
58+
### folder\_categories
59+
60+
* type: `array` (nested)
61+
* default:
62+
63+
```
64+
'folder_categories' => [
65+
'file' => [
66+
'folder_name' => 'files',
67+
'startup_view' => 'list',
68+
'max_size' => 50000, // size in KB
69+
'valid_mime' => [
70+
'image/jpeg',
71+
'image/pjpeg',
72+
'image/png',
73+
'image/gif',
74+
'application/pdf',
75+
'text/plain',
76+
],
77+
],
78+
'image' => [
79+
'folder_name' => 'photos',
80+
'startup_view' => 'grid',
81+
'max_size' => 50000, // size in KB
82+
'valid_mime' => [
83+
'image/jpeg',
84+
'image/pjpeg',
85+
'image/png',
86+
'image/gif',
87+
],
88+
],
89+
],
90+
```
91+
92+
The default config creates two folder categories, `file` and `image`, each operates independently. Files uploaded by users will be placed under one of these folder categories, depend on which is configured with your WYSIWYG editor or stand-alone upload button.
6493

6594
## Startup Views:
6695

0 commit comments

Comments
 (0)