📜 Interface – Epic 4: File Management - fuhui14/SWEN90017-2024-TAP GitHub Wiki
This document outlines the interface design and functionality for Epic 4: File Management of the Transcription Aide Platform (TAP). It describes the UI elements, interactions, and backend API integrations required for managing transcription result files, including saving, retrieving, and managing file expiration.
- Epic ID: 4
- Epic Name: File Management
- Objective: To provide functionality for saving, retrieving, and automatically managing the deletion of transcription result files.
- UI Element: Save Confirmation Icon
- Label: "(Save Transcription Result Icon)"
- Description: Automatically saves transcription results to a local database after processing.
-
Validation: The progress bar dynamically updates based on the file processing status.
-
Component:
<div class="save-confirmation">Your transcription results have been saved.</div>
-
Component:
-
UI Element: History Section
-
Label: "Transcription History"
-
Description: Displays a list of the user's previous transcriptions, showing the file name, creation date, and expiration date.
-
Component:
<table><thead><tr><th>File Name</th><th>Creation Date</th><th>Expiration Date</th></tr></thead><tbody><tr><td>audio1.docx</td><td>01-10-2024</td><td>01-11-2024</td></tr></tbody></table>
-
Component:
- UI Element: Expiration Date Display
- Label: "File Expiration Date"
-
Description: Users can see when their files will be automatically deleted from the system.
-
Component:
<div class="expiration-date">Your file will be deleted on: 01-11-2024</div>
-
Component:
- UI Element: Download Button
- Label: "Download Icon"
-
Description: Allows users to download their transcription files from the history section.
-
Component:
<button type="button">Download</button>
-
Component:
-
Automatic Saving of Transcriptions::
- Once the transcription is complete, the system automatically saves the file to the database.
-
Viewing Transcription History::
- Users can navigate to the history section to view and manage their past transcriptions, including downloading or viewing expiration dates.
-
File Expiration:
- Files are automatically deleted after 30 days, and users are shown the expiration date in the history section.
-
Downloading Transcriptions:
- Users can download files directly from their history section.
-
Endpoint:
/api/save-transcription
-
Method:
POST
- Description: Automatically saves the transcription result to the local database after processing.
-
Parameters:
- field (string): The unique ID of the transcribed file.
- fileData (binary): The actual transcription file data.
- expirationDate (date): The date when the file will be deleted.
-
Endpoint:
/api/history
-
Method:
GET
- Description: Retrieves the user's transcription history, including file names, creation dates, and expiration dates.
-
Response:
- Success: Returns the transcription history.
- Error: Returns an error if no history is found for the user.
- Scenario: If the system fails to save the transcription result, an error is displayed to the user.
- Error Message: "Failed to save transcription result. Please try again."
- Scenario: If the user attempts to download a file that no longer exists, an error is displayed.
- Error Message: "File not found. It may have been expired."
- Accessibility: Ensure all form elements (input fields, dropdowns, and buttons) are accessible to users with disabilities (e.g., using screen readers).
- Responsiveness: The interface should be responsive and adapt to different screen sizes, ensuring optimal user experience on both desktop and mobile devices.
- Visual Feedback: Provide visual feedback (e.g., checkmarks, progress indicators) to inform users that their input has been received and processed.