@@ -32,12 +32,24 @@ describe("S3UploadConfig", () => {
32
32
newS3UploadConfig ( { file1 : { } , file2 : { } , file3 : { } } ) ;
33
33
newS3UploadConfig ( { file : { metadata : { } } } ) ;
34
34
newS3UploadConfig ( { file : { contentType : { } } } ) ;
35
- newS3UploadConfig ( { file : { metadata : { } , contentType : "" , contentDisposition : "" } } ) ;
36
35
newS3UploadConfig ( {
37
- file : { metadata : { key : "value" } , contentType : "" , contentDisposition : "" } ,
36
+ file : { metadata : { } , contentType : "" , contentDisposition : "" , cacheControl : "" } ,
38
37
} ) ;
39
38
newS3UploadConfig ( {
40
- file : { metadata : null , contentType : null , contentDisposition : null } ,
39
+ file : {
40
+ metadata : { key : "value" } ,
41
+ contentType : "" ,
42
+ contentDisposition : "" ,
43
+ cacheControl : "" ,
44
+ } ,
45
+ } ) ;
46
+ newS3UploadConfig ( {
47
+ file : {
48
+ metadata : null ,
49
+ contentType : null ,
50
+ contentDisposition : null ,
51
+ cacheControl : null ,
52
+ } ,
41
53
} ) ;
42
54
newS3UploadConfig ( { file : { unknownKey : "unknownValue" } } ) ;
43
55
} ) ;
@@ -54,6 +66,7 @@ describe("S3UploadConfig", () => {
54
66
"src/**/*.png" : {
55
67
contentType : "image/png" ,
56
68
contentDisposition : 'attachment; filename="download.png"' ,
69
+ cacheControl : "public" ,
57
70
} ,
58
71
} ) ;
59
72
} ) ;
@@ -79,6 +92,7 @@ describe("S3UploadConfig", () => {
79
92
} ,
80
93
contentType : "text/plain" ,
81
94
contentDisposition : "inline; filename=other-name.txt" ,
95
+ cacheControl : "max-age=600" ,
82
96
randomKey : "value" ,
83
97
} ,
84
98
} ) . getS3ParamsForKey ( "file.txt" )
@@ -88,6 +102,7 @@ describe("S3UploadConfig", () => {
88
102
} ,
89
103
ContentType : "text/plain" ,
90
104
ContentDisposition : "inline; filename=other-name.txt" ,
105
+ CacheControl : "max-age=600" ,
91
106
} ) ;
92
107
} ) ;
93
108
0 commit comments