🖥️  Frontend Issue — Support Additional File Formats for “Create Sample via File”
🗣️  User Feedback
"XML may not be the best format to use going forward. Other formats (e.g., JSON) can provide more accessible and complete information from additional repositories."
🎯  Goal
Extend the “Create Sample via File” feature in the SEPIA frontend to support additional file formats beyond XML. This will enable users to upload JSON, CSV, Excel, YAML, or TOML files, which will be sent to the new backend endpoint:
POST /sample/create_with_file_upload
🧩  Implementation Details
Tasks
- 
Extend the “Create Sample via File” form to accept multiple file types.  - 
Validate supported file extensions client-side ( .xml,.json,.csv,.xlsx,.yaml,.toml). - 
Automatically detect and display the uploaded file format (e.g., “Detected format: JSON”).  - 
Include the file format (extension or MIME type) in the upload request payload.  - 
Ensure the request uses multipart/form-data(as required by backend). - 
Maintain compatibility with existing XML upload flow.  - 
Update UI text/help to list all supported formats.  
Notes
- The backend endpoint 
/sample/create_with_file_uploadreplaces the old/sample/create_with_xml_upload. - Ensure the 
filefield and parameter naming match the backend OpenAPI spec. - Coordinate with backend changes that extend supported formats.
 
✅  Target Formats
- 
JSON  - 
Excel (.xlsx)  - 
CSV  - 
YAML  - 
TOML  
Implementation can proceed incrementally.
🧪  Testing
- 
Validate file selection and file type detection.  - 
Confirm payload structure matches backend expectations.  - 
Verify success and error messages for each supported format.  
🏷️  Labels
frontend feature enhancement data-upload priority::high
📘  References
- Backend Endpoint: 
/sample/create_with_file_upload - Related Issue: Backend Issue — Extend 
/sample/create_with_file_uploadto Support Additional File Formats