fix: Extract docx file fails when the file contains an invalid link (#17576)

This commit is contained in:
Steven Li 2025-04-08 13:59:33 +08:00 committed by GitHub
parent 07ed728605
commit abead647e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,7 @@ class WordExtractor(BaseExtractor):
if "image" in rel.target_ref:
image_count += 1
if rel.is_external:
url = rel.reltype
url = rel.target_ref
response = ssrf_proxy.get(url)
if response.status_code == 200:
image_ext = mimetypes.guess_extension(response.headers["Content-Type"])