[PR #4516] [MERGED] Fix: File pulling fails with uppercase URL characters #4657

Closed
opened 2026-02-22 18:36:16 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4516
Author: @angelplusultra
Created: 10/8/2025
Status: Merged
Merged: 10/8/2025
Merged by: @timothycarambat

Base: masterHead: 4514-bug-file-parsing-fails-for-urls-with-uppercase-characters


📝 Commits (7)

  • 94a5d3a fix: remove unnecessary toLowerCase in URL validation
  • 47c9059 test: enhance URL validation tests to preserve case sensitivity and format
  • d45221c test: update URL validation tests to ensure domain normalization to lowercase while preserving path case
  • 8ca5628 small formatting
  • f4dfb6d merge
  • b33c3b0 fix filenames when downloading live URI
  • 554f9f3 Merge branch 'master' into 4514-bug-file-parsing-fails-for-urls-with-uppercase-characters

📊 Changes

3 files changed (+32 additions, -11 deletions)

View changed files

📝 collector/__tests__/utils/url/index.test.js (+21 -4)
📝 collector/utils/downloadURIToFile/index.js (+7 -1)
📝 collector/utils/url/index.js (+4 -6)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #4514

What is in this change?

This PR fixes a bug during the URL file pulling process where a URL has uppercase characters and we were converting the URL to lowercase, this was resulting in 404 not found errors being thrown when fetching the content type of the URL.

Additional Information

Additionally addresses the path.basename use in downloadURIToFile function causing weird output names in RAG uploader.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4516 **Author:** [@angelplusultra](https://github.com/angelplusultra) **Created:** 10/8/2025 **Status:** ✅ Merged **Merged:** 10/8/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `4514-bug-file-parsing-fails-for-urls-with-uppercase-characters` --- ### 📝 Commits (7) - [`94a5d3a`](https://github.com/Mintplex-Labs/anything-llm/commit/94a5d3a18b73befabc7b406ed416c127b4eaeb66) fix: remove unnecessary toLowerCase in URL validation - [`47c9059`](https://github.com/Mintplex-Labs/anything-llm/commit/47c9059e2e0ee60950cf067e2cefb13a413550ae) test: enhance URL validation tests to preserve case sensitivity and format - [`d45221c`](https://github.com/Mintplex-Labs/anything-llm/commit/d45221cf322fa1168ffd16ee4fb2c43f38f9b6e5) test: update URL validation tests to ensure domain normalization to lowercase while preserving path case - [`8ca5628`](https://github.com/Mintplex-Labs/anything-llm/commit/8ca5628583cb72de173affc11a3004e1143ae991) small formatting - [`f4dfb6d`](https://github.com/Mintplex-Labs/anything-llm/commit/f4dfb6d193054536e1e39c41de1e6784124eb9df) merge - [`b33c3b0`](https://github.com/Mintplex-Labs/anything-llm/commit/b33c3b0fbb30356e428d9607b3e6c5b22c52b975) fix filenames when downloading live URI - [`554f9f3`](https://github.com/Mintplex-Labs/anything-llm/commit/554f9f368b692197e7ff6b14d83d96cf18b82235) Merge branch 'master' into 4514-bug-file-parsing-fails-for-urls-with-uppercase-characters ### 📊 Changes **3 files changed** (+32 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `collector/__tests__/utils/url/index.test.js` (+21 -4) 📝 `collector/utils/downloadURIToFile/index.js` (+7 -1) 📝 `collector/utils/url/index.js` (+4 -6) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #4514 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> This PR fixes a bug during the URL file pulling process where a URL has uppercase characters and we were converting the URL to lowercase, this was resulting in 404 not found errors being thrown when fetching the content type of the URL. ### Additional Information Additionally addresses the `path.basename` use in `downloadURIToFile` function causing weird output names in RAG uploader. <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:16 -05:00
yindo closed this issue 2026-02-22 18:36:16 -05:00
yindo changed title from [PR #4516] Fix: File pulling fails with uppercase URL characters to [PR #4516] [MERGED] Fix: File pulling fails with uppercase URL characters 2026-06-05 15:19:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4657