My Files
- Code: ACC-FIL
- Module: Account
- Type: Master Data
1. Overview
My Files is the library of files uploaded by the logged-in user, such as profile photos, product images, and logos. Users can browse, search, and filter their own files, then delete the ones that are no longer used. This page is the personal version of Settings → File Manager: only the user’s own files are shown.
Expected outcome: users can clean up their own uploads without admin help.
2. Problem
Without a personal file management space, unused uploads pile up and can only be cleaned up through an admin. As a result:
- Users often replace photos or images, leaving their old files behind unused.
- Regular users have no access to the tenant’s File Manager, even though they need to manage their own uploads.
3. Goals & Non-goals
3.1 Goals
- Users can see and clean up their own uploads without admin access.
- Files that are no longer used do not pile up unnoticed by their owner.
3.2 Non-goals
- Uploading files directly from this page; uploads are done from the features that need them.
- Sharing files with other users.
- Viewing other users’ files; that need is served by the File Manager for admins.
4. Business Rules
Business rules are the set of provisions and constraints that apply to My Files across the whole application, on every screen and action involved, whoever performs them. These rules are the single source of truth: if another part of this PRD seems to differ, the rule here applies.
- BR-01 Only files uploaded by the user themselves are shown and can be deleted from this page. Other users’ files cannot be viewed.
- BR-02 Files are not uploaded from this page, but from the features that need them, such as the profile photo. A file that is uploaded but not saved stays temporary, is not shown here, and is cleaned up automatically after it expires.
- BR-03 A file’s category is determined by its type: image, video, or document. Audio files are currently recorded as documents.
- BR-04 The list can be searched by name and filtered by usage (used or unused), category, and extension. The extension options only contain extensions of the chosen categories. Without a sort chosen by the user, the list is sorted from the most recently updated.
- BR-05 A file that is still used by other data, meaning the Used In column is not empty, cannot be deleted, whether one at a time or several at once. The user sees a message that the file is still in use.
- BR-06 Deleting one file only requires that the file belongs to the user. Deleting several files at once currently also requires the
settings:file:delete:anypermission, and if even one file is rejected (not their own, no permission, or still in use), the whole deletion is cancelled. - BR-07 Deletion is always confirmed first. A deleted file is also removed from storage and cannot be recovered.
5. Flow
5.1 Main Flowchart
- Open My Files — The list of the user’s own files is shown and loaded in batches (BR-01).
- Choose View — The user chooses the Table or Grid view. The choice is remembered in the browser.
- Search and Filter — The user searches files by name, or filters them by category, extension, and usage (BR-04).
- Choose Action — The user chooses to view a file, or to delete one or several files.
- Preview File — The content of the file is viewed first to make sure it is the right file.
- Confirm Delete — The user confirms the deletion. A file that is still in use is rejected (BR-05, BR-06, BR-07).
- File Deleted — The file disappears from the user’s personal library and from storage (BR-07).
6. Document Structure
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| File Name | Text | — | Follows the uploaded file | The file name with its extension |
| Category | Enum | — | Determined from the file type | Image, document, or video (BR-03) |
| Size | Number | — | Follows the uploaded file | — |
| Uploaded At | Date & Time | — | Upload time | Filled from the time the file was last updated |
| Used In | Text, many | — | — | Names where this file is used, for example Avatar; empty is shown as ”-” (BR-05) |
7. UI Structure
This section defines how My Files is displayed and operated: list columns and filters with their option sources. It only governs presentation and interaction; the rules for content and values still follow Document Structure.
7.1 Datatable
Can be switched to the Grid view; the chosen view is stored in the browser.
| Column | Sortable | Example Value | Component |
|---|---|---|---|
| File Name | — | profile-photo.png | Thumbnail, Text |
| Category | — | Image | Badge |
| Size | — | 180 KB | Text |
| Uploaded At | — | 23 Sep 2026 | Date |
| Used In | — | Avatar | Accordion when used in more than one place, ”-” when empty |
| Action | — | View · Delete | Action Menu |
Grid
| Part | Example Value | Component |
|---|---|---|
| Thumbnail | — | Thumbnail, only for image files |
| File Name | profile-photo.png | Text |
| File Type | image/png | Text |
7.2 Advance Filter
| Field | Control | Options Source | Default |
|---|---|---|---|
| Usage | Single Select | Used or Unused | Empty |
| Category | Multi Select (checkbox) | Image, Document, Audio, Video | Empty |
| Extension | Multi Select (checkbox) | Follows the chosen categories (BR-04) | Empty |
8. User Stories
US-01 - Browse my files
As a user, I want to see all the files I have uploaded.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | Only files of the logged-in user are shown (BR-01). |
| AC-01.2 | The table view shows file name, category, size, uploaded at, and used in; empty values show ”-”. |
| AC-01.3 | The grid view shows a thumbnail for image files, the file name, and the file type. |
| AC-01.4 | The Table or Grid choice is remembered in the browser. |
| AC-01.5 | A file uploaded whose form was never saved is not shown here and is cleaned up automatically (BR-02). |
| AC-01.6 | A file with the Unused status comes from a file whose link was released, for example an old profile photo that was replaced. |
US-02 - Search and filter
As a user, I want to filter my files.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | Search filters the list by file name (BR-04). |
| AC-02.2 | Filters are available for category (can be more than one), extension (follows the chosen categories), and usage (BR-04). |
| AC-02.3 | The number of active filters is shown on the filter button. |
| AC-02.4 | The audio category exists in the filter but gives no results because audio files are recorded as documents (BR-03). Needs confirmation: whether the audio category should be given to audio files. |
US-03 - Preview a file
As a user, I want to see the content of my file before deleting it.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | The View action opens a preview, from both the table and the grid view. |
US-04 - Delete files
As a user, I want to delete files I no longer use.
| ID | Acceptance criteria |
|---|---|
| AC-04.1 | Deleting one file is available to all users and asks for confirmation first (BR-06, BR-07). |
| AC-04.2 | Deleting several files at once asks for confirmation first and currently requires the File Manager permission; the button is still shown to all users (BR-06). Needs confirmation: whether deleting several at once should be without the File Manager permission, like deleting one file. |
| AC-04.3 | A file that is still in use, for example the user’s own profile photo or a product image, cannot be deleted and a file-still-in-use message appears as a toast (BR-05). |
| AC-04.4 | Even one file is rejected in a delete-several action — the whole deletion is cancelled and an error message appears as a toast (BR-06). |
| AC-04.5 | After success, the file disappears from the list and cannot be recovered (BR-07). |
9. User Scenarios
| Role | Scenario |
|---|---|
| User | Filters “Unused” files and deletes them all at once |
| User | Searches for a product image they uploaded earlier to check it |
| User | Switches to the grid view to see images visually |
| User | Replaces their profile photo, then deletes the old photo from My Files |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View, Search, and Delete One File | — | User is logged in; own files only |
| Delete Several Files at Once | settings:file:delete:any | User is logged in; own and unused files only (see the needs-confirmation note in AC-04.2) |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- File Manager (Settings) — the tenant version with all files and an uploader filter.
- My Account — the profile photo is stored as a file owned by the user, and the old photo stays here as Unused.
Effects on other modules
- A file deleted from here is permanently removed from storage and can no longer be chosen by other features, such as the profile photo.