Skip to content

Commit 86c6e5c

Browse files
committed
fix: wrong file mime type
1 parent f9cf6eb commit 86c6e5c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"qiniu": "^7.3.0"
3131
},
3232
"devDependencies": {
33+
"@types/glob": "^7.1.3",
3334
"@types/jest": "^24.0.24",
3435
"@types/node": "^13.1.0",
3536
"@typescript-eslint/eslint-plugin": "^2.13.0",

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function run(): Promise<void> {
1818
sourceDir,
1919
destDir,
2020
ignoreSourceMap,
21-
(file, key) => core.info(`success: ${file} => [${bucket}]: ${key}`),
21+
(file, key) => core.info(`Success: ${file} => [${bucket}]: ${key}`),
2222
() => core.info('Done!'),
2323
(error) => core.setFailed(error.message),
2424
);

src/upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export function upload(
2222

2323
const config = new qiniu.conf.Config();
2424
const uploader = new qiniu.form_up.FormUploader(config);
25-
const putExtra = new qiniu.form_up.PutExtra();
2625

2726
const tasks = files.map((file) => {
2827
const relativePath = path.relative(baseDir, path.dirname(file));
@@ -31,6 +30,7 @@ export function upload(
3130
if (ignoreSourceMap && file.endsWith('.map')) return null;
3231

3332
const task = (): Promise<any> => new Promise((resolve, reject) => {
33+
const putExtra = new qiniu.form_up.PutExtra();
3434
uploader.putFile(token, key, file, putExtra, (err, body, info) => {
3535
if (err) return reject(new Error(`Upload failed: ${file}`));
3636

0 commit comments

Comments
 (0)