Skip to content

Commit a3e936c

Browse files
committed
管理端支持拉黑上传ip;管理端批量操作支持按照用户选择的顺序进行;random接口优化
1 parent 2a75ef9 commit a3e936c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/upload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export async function onRequestPost(context) { // Contents of context object
148148

149149
// 清除CDN缓存
150150
const cdnUrl = `https://${url.hostname}/file/${fullId}`;
151-
await purgeCDNCache(env, cdnUrl);
151+
await purgeCDNCache(env, cdnUrl, url);
152152

153153

154154
// ====================================不同渠道上传=======================================
@@ -440,7 +440,7 @@ async function getFilePath(env, file_id) {
440440
}
441441
}
442442

443-
async function purgeCDNCache(env, cdnUrl) {
443+
async function purgeCDNCache(env, cdnUrl, url) {
444444
// 清除CDN缓存,包括图片和randomFileList接口的缓存
445445
const randomFileListUrl = `https://${url.hostname}/api/randomFileList`;
446446
const options = {

0 commit comments

Comments
 (0)