Skip to content

Commit

Permalink
Merge pull request #22 from tezignlab/feat/upload_docs
Browse files Browse the repository at this point in the history
feat: add urlFile
  • Loading branch information
jyu213 authored Jan 8, 2024
2 parents 2b1ce31 + 9862b8c commit 85f86b9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/frontend/asset-uploader/events/transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
sidebar_position: 6
---

# 上传 File 文件
# 上传 File 文件 / URL 转存

支持通过 `postMessage` 的方式来上传文件。
支持通过 `postMessage` 的方式来上传文件。支持 File 文件格式或者是 URL 的方式。其中 URL 对应的域名白名单,需要找特赞技术同学开通

## 数据结构

Expand All @@ -14,9 +14,16 @@ interface EventConfirm {
type: 'tezign-asset-uploader-upload';
data: {
type: string;
files: File[];
files: File[] | UrlFile[];
};
}

export interface UrlFile {
// 文件名需要格式后缀,如 test.png
fileName?: string;
// 可下载的资源链接
url: string;
}
```

[File 文件对象](https://developer.mozilla.org/en-US/docs/Web/API/File)

0 comments on commit 85f86b9

Please sign in to comment.