Commit d784c37 1 parent baa0a49 commit d784c37 Copy full SHA for d784c37
File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const attachment = (options?: LucidOptions) => {
22
22
const defaultOptions = {
23
23
meta : defaultConfig . meta !== undefined ? defaultConfig . meta : defaultOptionsDecorator . meta ,
24
24
rename : defaultConfig . rename !== undefined ? defaultConfig . rename : defaultOptionsDecorator . rename ,
25
+ preComputeUrl : defaultConfig . preComputeUrl !== undefined ? defaultConfig . preComputeUrl : defaultOptionsDecorator . preComputeUrl ,
25
26
}
26
27
27
28
if ( ! options || options ?. meta === undefined ) {
@@ -30,6 +31,9 @@ export const attachment = (options?: LucidOptions) => {
30
31
if ( ! options || options ?. rename === undefined ) {
31
32
options ! . rename = defaultOptions . rename
32
33
}
34
+ if ( ! options || options ?. preComputeUrl === undefined ) {
35
+ options ! . preComputeUrl = defaultOptions . preComputeUrl
36
+ }
33
37
34
38
target [ optionsSym ] [ attributeName ] = options
35
39
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export type AttachmentConfig = {
26
26
bin ?: BinPaths
27
27
meta ?: boolean
28
28
rename ?: boolean
29
+ preComputeUrl ?: boolean
29
30
converters ?: ConverterConfig [ ]
30
31
}
31
32
@@ -38,5 +39,6 @@ export type ResolvedAttachmentConfig = {
38
39
bin ?: BinPaths
39
40
meta ?: boolean
40
41
rename ?: boolean
42
+ preComputeUrl ?: boolean
41
43
converters ?: ResolvedConverter [ ]
42
44
}
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ export const defaultOptionsDecorator = {
10
10
folder : 'uploads' ,
11
11
preComputeUrl : false ,
12
12
variants : [ ] ,
13
- rename : true ,
14
- meta : true
13
+ meta : true ,
14
+ rename : true
15
15
}
16
16
17
17
export const defaultStateAttributeMixin = {
You can’t perform that action at this time.
0 commit comments