|
2 | 2 |
|
3 | 3 | ## Routing: |
4 | 4 |
|
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`. |
10 | 11 |
|
11 | 12 |
|
12 | 13 | ## Multi-User Mode: |
@@ -51,16 +52,44 @@ If you want to customize client folders: |
51 | 52 |
|
52 | 53 | All users can upload and manage files within shared folders. Set to `false` to turn this feature off. |
53 | 54 |
|
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/`. | |
63 | 55 |
|
| 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. |
64 | 93 |
|
65 | 94 | ## Startup Views: |
66 | 95 |
|
|
0 commit comments