Skip to content

Commit 40130df

Browse files
committed
fix(cos): website method using keyPrefix
1 parent b06521b commit 40130df

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/modules/cos/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ export default class Cos {
617617
const dirToUploadPath: string | undefined = inputs.code?.src ?? inputs.code?.root;
618618
const uploadDict: CosUploadInputs = {
619619
bucket: inputs.bucket,
620+
keyPrefix: inputs.keyPrefix || '/',
620621
replace: inputs.replace!,
621622
};
622623
if (fs.lstatSync(dirToUploadPath!).isDirectory()) {

src/modules/cos/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export interface CosUploadInputs {
177177
export interface CosWebsiteInputs extends CosSetWebsiteInputs {
178178
bucket?: string;
179179
force?: boolean;
180+
keyPrefix?: string;
180181
}
181182

182183
export interface CosDeployInputs

0 commit comments

Comments
 (0)