We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a75ef9 commit a3e936cCopy full SHA for a3e936c
functions/upload.js
@@ -148,7 +148,7 @@ export async function onRequestPost(context) { // Contents of context object
148
149
// 清除CDN缓存
150
const cdnUrl = `https://${url.hostname}/file/${fullId}`;
151
- await purgeCDNCache(env, cdnUrl);
+ await purgeCDNCache(env, cdnUrl, url);
152
153
154
// ====================================不同渠道上传=======================================
@@ -440,7 +440,7 @@ async function getFilePath(env, file_id) {
440
}
441
442
443
-async function purgeCDNCache(env, cdnUrl) {
+async function purgeCDNCache(env, cdnUrl, url) {
444
// 清除CDN缓存,包括图片和randomFileList接口的缓存
445
const randomFileListUrl = `https://${url.hostname}/api/randomFileList`;
446
const options = {
0 commit comments