Skip to content

Commit

Permalink
perf: alioss getAuthorization接口支持后台返回key
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Jun 7, 2024
1 parent 75e5b14 commit 93f4493
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/fast-extends/src/uploader/type/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FsUploaderOptions, FsUploaderGetAuthContext } from "../d/type";
import { FsUploaderOptions, FsUploaderGetAuthContext, FsUploaderAliossSTS } from "../d/type";
import _ from "lodash-es";

export const defaultConfig: FsUploaderOptions = {
Expand All @@ -21,7 +21,7 @@ export const defaultConfig: FsUploaderOptions = {
region: "oss-cn-shenzhen",
accessKeyId: "", // "",
accessKeySecret: "",
getAuthorization(context: FsUploaderGetAuthContext) {
getAuthorization(context: FsUploaderGetAuthContext): Promise<FsUploaderAliossSTS> {
// 不传secretKey代表使用临时签名模式时(安全)
return new Promise((resolve, reject) => {
reject(new Error("请实现config.alioss.getAuthorization,返回Promise获取临时授权token"));
Expand Down

0 comments on commit 93f4493

Please sign in to comment.