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

This commit is contained in:
非法操作 2024-10-21 18:44:25 +08:00 committed by GitHub
parent 90dd91c6cd
commit a5777683f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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