From c8c81733a0770ef5f0c2a7da54eef57949645494 Mon Sep 17 00:00:00 2001 From: VK <370725567@qq.com> Date: Fri, 5 Jan 2024 20:06:02 +0800 Subject: [PATCH] update: ext-storage\dev.md --- docs/ext-storage/dev.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/ext-storage/dev.md b/docs/ext-storage/dev.md index 558c247..8af87f8 100644 --- a/docs/ext-storage/dev.md +++ b/docs/ext-storage/dev.md @@ -84,6 +84,26 @@ module.exports = { |fileID |String |文件ID | |fileURL |String |文件URL(如果是私有权限的文件,则此URL是无法直接访问的) | +响应参数 uploadFileOptions 详情 + +```json +{ + "expTime": 1704459639, // 过期时间,已秒为单位的时间戳 + "cloudPath": "public/test/1704456039122.jpg", // 文件云端路径 + "fileID": "qiniu://public/test/1704456039122.jpg", // 文件ID + "fileURL": "https://cdn.example.com/public/test/1704456039122.jpg", // 文件URL(如果是私有权限的文件,则此URL是无法直接访问的) + "uploadFileOptions": { + "url": "https://upload.qiniup.com", // 上传网关地址,对应uni.uploadFile的url参数 + "name": "file", // 文件对应的 key,对应uni.uploadFile的name参数 + // HTTP 请求中其他额外的 form data,对应uni.uploadFile的formData参数 + "formData": { + "token": "xxxxxxxx", + "key": "public/test/1704456039122.jpg", + } + } +} +``` + **前端上传代码** ```js -- GitLab