@@ -85,7 +85,7 @@ export class FileStorage implements AppStorage {
8585 releaseId : string ,
8686 file : Buffer ,
8787 ) : Promise < void > {
88- const releaseFolder = `${ this . #directory} /modules/${ moduleName } /${ releaseId } ` ;
88+ const releaseFolder = `${ this . #directory} /modules/${ moduleName . toLowerCase ( ) } /${ releaseId } ` ;
8989 await fs . mkdir ( releaseFolder , { recursive : true } ) ;
9090 const fileName = type === "scripts" ? "scripts.zip" : "metadata.json" ;
9191 await fs . writeFile ( `${ releaseFolder } /${ fileName } ` , new Uint8Array ( file ) ) ;
@@ -139,7 +139,7 @@ export class S3Storage implements AppStorage {
139139 const response = await this . #client. send (
140140 new GetObjectCommand ( {
141141 Bucket : this . #bucketName,
142- Key : `/public/images/${ type } s/${ name } .png` ,
142+ Key : `/public/images/${ type } s/${ name . toLowerCase ( ) } .png` ,
143143 } ) ,
144144 ) ;
145145
@@ -159,7 +159,7 @@ export class S3Storage implements AppStorage {
159159 const response = await this . #client. send (
160160 new GetObjectCommand ( {
161161 Bucket : this . #bucketName,
162- Key : `/public/modules/${ moduleName } /${ releaseId } /${ fileName } ` ,
162+ Key : `/public/modules/${ moduleName . toLowerCase ( ) } /${ releaseId } /${ fileName } ` ,
163163 } ) ,
164164 ) ;
165165
@@ -174,7 +174,7 @@ export class S3Storage implements AppStorage {
174174 const response = await this . #client. send (
175175 new PutObjectCommand ( {
176176 Bucket : this . #bucketName,
177- Key : `/public/images/${ type } s/${ name } .png` ,
177+ Key : `/public/images/${ type } s/${ name . toLowerCase ( ) } .png` ,
178178 Body : await file . toBuffer ( ) ,
179179 ACL : "public-read" ,
180180 } ) ,
@@ -195,7 +195,7 @@ export class S3Storage implements AppStorage {
195195 const response = await this . #client. send (
196196 new PutObjectCommand ( {
197197 Bucket : this . #bucketName,
198- Key : `/public/modules/${ moduleName } /${ releaseId } /${ fileName } ` ,
198+ Key : `/public/modules/${ moduleName . toLowerCase ( ) } /${ releaseId } /${ fileName } ` ,
199199 Body : file ,
200200 } ) ,
201201 ) ;
0 commit comments