diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca5fac7..823d7f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,9 @@ name: Build and Deploy + on: push: - branches: [ main ] + branches: [ main ] + jobs: build-and-deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 03f486d..02ee1c4 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,10 +1,8 @@ name: Prettier on: - pull_request: push: - branches: - - main + branches: [ main ] jobs: prettier: diff --git a/src/api/file.js b/src/api/file.js index 48bd83e..2c7872d 100644 --- a/src/api/file.js +++ b/src/api/file.js @@ -127,10 +127,7 @@ async function qiniuUpload(file) { }); const dir = path ? `${path}/` : ""; const dateFilename = dir + getDateFilename(file.name); - const config = { - region, - }; - const observable = qiniu.upload(file, dateFilename, token, {}, config); + const observable = qiniu.upload(file, dateFilename, token, {}, { region }); return new Promise((resolve, reject) => { observable.subscribe({ next: (result) => {