瀏覽代碼

fix: when upload file response 3** will raise error (#9555)

非法操作 6 月之前
父節點
當前提交
a5777683f3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/factories/file_factory.py

+ 1 - 1
api/factories/file_factory.py

@@ -177,7 +177,7 @@ def _build_from_remote_url(
     url = mapping.get("url")
     if not url:
         raise ValueError("Invalid file url")
-    resp = ssrf_proxy.head(url)
+    resp = ssrf_proxy.head(url, follow_redirects=True)
     resp.raise_for_status()
 
     # Try to extract filename from response headers or URL