FIRST-Tech-Challenge / FIRST-Tech-Challenge/scorekeeper
Accessing custom uploaded resources with spaces in filename doesn't work
- Dominant language
- No language data
- Stars
- 110
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
After uploading a file with a space in the name to the "Resources" section, attempting to access it results in a 404.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to "Resources"
2. Upload a file with a space in the file name
- Uploading "into_the_deep.png" works, uploading "into the deep.png" does not.
4. Click on the file to access it
5. See error
**Expected behavior**
The file loads using default browser behavior
**Screenshots**
```
02:20:11.613 [JettyServerThreadPool-102] [] INFO org.usfirst.ftc.server.Server - Time: 01/16/2025 02:20:11:613 AM, Session: Optional[85c1cf1f-5ba4-46bd-8d01-64d62c32b812], User: local, Route: http://localhost/resources/upload/ POST
02:20:11.617 [JettyServerThreadPool-102] [] INFO o.u.ftc.server.ServerRoutesLogic - Uploading into the deep.png
[snip...]
02:20:13.611 [JettyServerThreadPool-89] [] INFO org.usfirst.ftc.server.Server - Time: 01/16/2025 02:20:13:611 AM, Session: Optional[85c1cf1f-5ba4-46bd-8d01-64d62c32b812], User: local, Route: http://localhost/resources/into%20the%20deep.png GET
02:20:13.614 [JettyServerThreadPool-89] [] INFO org.eclipse.jetty.server.RequestLog - [localhost] 127.0.0.1 - - [16/Jan/2025:10:20:13 +0000] "GET /resources/into%20the%20deep.png HTTP/1.1" 404 2388 "http://localhost/resources/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0" 4000
```
**Device (please complete the following information):**
- OS: macOS 15.2 (24C101)
- Browser: Firefox 133.0.3 (aarch64)
- FTCLive v6.4.2
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the /resources/upload/ POST route and the /resources/{filename} GET route shown in the report, focusing on how the filename is handled between upload and retrieval. Reproduce the issue with “into the deep.png” and confirm that the resource loads successfully, while the existing underscore filename continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100