933 B
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.