Browse Source

fix file name

tags/2.0.0-beta.1
jyong 1 month ago
parent
commit
94f2956e3a
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      api/models/dataset.py

+ 2
- 1
api/models/dataset.py View File

signed_urls.append((match.start(), match.end(), signed_url)) signed_urls.append((match.start(), match.end(), signed_url))


# For tools directory - direct file formats (e.g., .png, .jpg, etc.) # 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) matches = re.finditer(pattern, text)
for match in matches: for match in matches:
upload_file_id = match.group(1) upload_file_id = match.group(1)

Loading…
Cancel
Save