This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
nova-markdown.php
83 lines (69 loc) · 2.47 KB
/
nova-markdown.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* Configuration for nova-markdown
*/
return [
/**
* Enable or disable uploads entirely
*/
'uploads' => env('NOVA_MARKDOWN_UPLOADS', true),
/**
* Enable uploads by default.
* Note, this has no effect up uploads are disabled entirely.
*/
'uploads-default-enabled' => env('NOVA_MARKDOWN_UPLOADS_DEFAULT_ENABLED', true),
/**
* The path prefix that will be used by nova-markdown routes
*/
'route-prefix' => env('NOVA_MARKDOWN_ROUTE_PREFIX', 'nova-markdown'),
/**
* The disk on which to store uploaded images, choose a disk as
* configured in config/filesystems.php.
*/
'disk' => env('NOVA_MARKDOWN_DISK', 'public'),
/**
* The visibility option when storing uploaded images.
*
* Files may either be declared "public" or "private". When a file is declared
* "public", you are indicating that the file should generally be accessible
* to others.
*/
'file-visibility' => env('NOVA_MARKDOWN_FILE_VISIBILITY', 'public'),
/**
* The directory where to place uploaded images within the disk.
*
* Can be a string with the directoryname. Alternatively, it's possible
* to configure a function, which takes the uploading $user as argument and
* returns the directory. This can be used to group uploads in a folder
* by user.
*
* Example:
* function($user) { return "uploads/" . \Str::slug($user->name); }
*/
'directory' => env('NOVA_MARKDOWN_DIRECTORY', 'uploads'),
/**
* The maximum size for uploaded images in kilobytes
*/
'max-size' => env('NOVA_MARKDOWN_MAX_SIZE', 8 * 1024),
/**
* The maximum width for uploaded images in pixels.
* Uploaded images will be scaled down to this width.
* Use null to disable image scaling.
*/
'max-width' => env('NOVA_MARKDOWN_MAX_WIDTH', 1920),
/**
* Uploaded images will be converted to this quality.
* Integer between 0 and 100. Use null to disable quality adjustments.
*/
'quality' => env('NOVA_MARKDOWN_QUALITY', 85),
/**
* Define the middleware stack to be used by nova-markdown routes.
* A sensible default has been set.
*/
'middleware' => config('nova.middleware'),
/**
* Uploaded images will be stored by default using a slug version of its
* original filename. You can set this to true to use a random filename.
*/
'random_filename' => env('NOVA_MARKDOWN_RANDOM_FILENAME', false),
];