fix file name

This commit is contained in:
jyong 2025-09-04 14:52:23 +08:00
parent 1e5f6c1475
commit 94f2956e3a
1 changed files with 2 additions and 1 deletions

View File

@ -820,7 +820,8 @@ class DocumentSegment(Base):
signed_urls.append((match.start(), match.end(), signed_url))
# For tools directory - direct file formats (e.g., .png, .jpg, etc.)
pattern = r"/files/tools/([a-f0-9\-]+)\.([a-zA-Z0-9]+)(?:\?.*?)?"
# Match URL including any query parameters up to common URL boundaries (space, parenthesis, quotes)
pattern = r"/files/tools/([a-f0-9\-]+)\.([a-zA-Z0-9]+)(?:\?[^\s\)\"\']*)?"
matches = re.finditer(pattern, text)
for match in matches:
upload_file_id = match.group(1)