@cnbcool/cnb-api-generate 2.11.1 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/utils/upload.ts +4 -0
- package/package.json +1 -1
package/client/utils/upload.ts
CHANGED
|
@@ -99,6 +99,7 @@ interface IssueAssetUploadURLResponseData {
|
|
|
99
99
|
path?: string;
|
|
100
100
|
asset_link?: string;
|
|
101
101
|
upload_url?: string;
|
|
102
|
+
download_url?: string;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
/** Pull 上传 API 响应 */
|
|
@@ -127,6 +128,7 @@ interface IssueUploadData {
|
|
|
127
128
|
path?: string;
|
|
128
129
|
size: number;
|
|
129
130
|
asset_group_id?: string;
|
|
131
|
+
download_url?: string;
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
/** Pull 上传成功时的 data */
|
|
@@ -289,6 +291,7 @@ export async function handleIssueCreateUpload(
|
|
|
289
291
|
path: firstEntry?.path,
|
|
290
292
|
size: fileSize,
|
|
291
293
|
asset_group_id: groupData?.asset_group_id,
|
|
294
|
+
download_url: firstEntry?.download_url,
|
|
292
295
|
},
|
|
293
296
|
};
|
|
294
297
|
}
|
|
@@ -345,6 +348,7 @@ export async function handleUpload(
|
|
|
345
348
|
name: data?.name || fileName,
|
|
346
349
|
path: data?.path,
|
|
347
350
|
size: fileSize,
|
|
351
|
+
download_url: data?.download_url,
|
|
348
352
|
};
|
|
349
353
|
} else {
|
|
350
354
|
// Pull:沿用 upload-files / upload-imgs 一步走接口
|