You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
933 B
Markdown

# Absolute Upload URL Design
## Goal
Ensure uploaded case materials can be opened from a deployed frontend even when the frontend and backend do not share the same origin.
## Decision
`CommonUploadController` will build its `url` and `fileName` response fields from the existing `file.url` setting plus the uploaded file's relative path. The setting already represents the public `/file` endpoint and is environment-specific.
The controller will normalize a trailing slash so both `https://host/file` and `https://host/file/` produce one valid absolute URL. Existing stored relative paths remain readable because the change only affects newly uploaded files.
## Error Handling and Verification
The current empty-file response remains unchanged. A focused controller test will verify the success response includes the original filename and a normalized absolute public URL. The backend test suite will be run after the change.