File Manager
- Code: SET-FIL
- Module: Settings
- Type: Master Data
1. Overview
File Manager is the library of all files uploaded in the tenant: company logos, product images, attachments, and more. Admins can browse, search, and filter all existing files, then delete the ones that are no longer used. Files are not uploaded directly from this page; uploads happen from each feature that needs them, and the same library is used when picking an existing file.
Expected outcome: the tenant’s storage stays tidy, and admins know which files are used where before deleting them.
2. Problem
Without a centralized file library, files uploaded across various features are hard to monitor and clean up. As a result:
- Uploaded files pile up, including files that were never used.
- It is hard to know where a file is used before deleting it.
- Users need to reuse the same file without uploading it again.
3. Goals & Non-goals
3.1 Goals
- Files that are no longer used can be found and cleaned up before they fill up storage.
- The usage of a file is known before it is deleted, so no display breaks.
- Existing files can be reused in other features without uploading them again.
3.2 Non-goals
- Uploading files directly from this page; uploads are done from the features that need them.
- Folders, renaming, and moving files.
- Storage quotas and usage statistics.
4. Business Rules
Business rules are the set of provisions and constraints that apply to File Manager throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.
- BR-01 Files can only be added from the features that need them, not from the File Manager page.
- BR-02 A file’s category is determined automatically from its file type: image, document, audio, or video.
- BR-03 Upload size is limited to a maximum of 1 MB per file.
- BR-04 Filtering by usage only distinguishes files that are in use from those that are not.
- BR-05 The extension filter options only contain extensions belonging to the currently selected categories.
5. Flow
5.1 Main Flowchart
- File List — All files uploaded in the tenant are shown and loaded incrementally.
- Search and Filter — Files are searched by name, or filtered by category, extension, usage status, and uploader.
- File Preview — The file’s content is viewed first to make sure it is the intended file.
- Confirm — Deletion is confirmed first, whether for one file or several at once.
- File Deleted — The file is deleted from the tenant’s library.
6. Document Structure
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Filename | Text | — | Follows the uploaded file | File name including its extension |
| Category | Enum | — | Determined by the file type | Image, document, audio, or video (BR-02) |
| Extension | Text | — | Follows the uploaded file | For example png, pdf |
| File Type | Text | — | Determined by the file content | For example image/png |
| Size | Integer | — | Follows the uploaded file | Maximum 1 MB per file (BR-03) |
| Uploaded At | Date & Time | — | Upload time | — |
| Created By | Ref. User | — | The uploading user | Set by the system |
| URL | Text | — | Generated when the file is stored | File address for previews |
| Used In | Ref. Data, multiple | — | — | List of data using this file |
7. UI Structure
This section defines how Files are displayed and operated: the list columns and filters along with their option sources. This section only governs display and interaction; content and value rules still follow Document Structure.
7.1 Datatable
Can be switched to Grid view; the view choice is stored in the browser.
| Column | Sortable | Sample Value | Component |
|---|---|---|---|
| Filename | — | logo-light.png | Thumbnail, Text |
| Category | — | Image | Badge |
| Size | — | 240 KB | Text |
| Uploaded At | — | 23 Sep 2026 | Date |
| Used In | — | Company | Accordion if more than one collection |
| Created By | — | Budi Santoso | Avatar, Text |
| Actions | — | View · Delete | Action Menu |
Grid
| Part | Sample Value | Component |
|---|---|---|
| Thumbnail Image | — | Thumbnail, only for image files |
| Filename | logo-light.png | Text |
| File Type | image/png | Text |
7.2 Advance Filter
| Field | Control | Options Source | Default |
|---|---|---|---|
| Usage | Single Select | Used or Unused | Empty |
| Created By | Multi Select | User master, searchable | Empty |
| Category | Multi Select (checkbox) | Image, Document, Audio, Video | Empty |
| Extension | Multi Select (checkbox) | Follows the selected categories (BR-05) | Empty |
8. User Stories
US-01 - Browse files
As an admin, I want to see all of the tenant’s files, so that I know what is stored.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | Table view: filename, category, size, uploaded at, used in, created by. |
| AC-01.2 | Grid view: thumbnail for image files, filename, and MIME type. |
| AC-01.3 | The grid/table view choice is stored in the browser and reused when the page is opened. |
| AC-01.4 | Data is loaded incrementally while scrolling. |
| AC-01.5 | The “Used In” column shows the collection name; if there is more than one, the number of collections is shown and can be expanded. |
US-02 - Search and filter files
As an admin, I want to filter files, so that I can quickly find a specific file.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | Search by keyword. |
| AC-02.2 | Filters for category (multiple), extension (multiple, according to category), usage (Used / Unused / all), and created by (multiple users). |
| AC-02.3 | The number of active filters appears on the filter button. |
US-03 - Preview a file
As an admin, I want to see a file’s content without downloading it.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | The View action opens a file preview from both the grid and table views. |
US-04 - Delete files
As an admin, I want to delete unused files, so that storage stays tidy.
| ID | Acceptance criteria |
|---|---|
| AC-04.1 | Single and bulk delete are only available to users with the delete permission, after confirmation. |
| AC-04.2 | If the deletion is rejected, the error message appears as a toast. |
| AC-04.3 | Deleting a file that is still in use, for example the company logo — there is no warning when deleting. Needs confirmation: whether it is rejected or its link is released as well. |
| AC-04.4 | Bulk delete where some files fail to be deleted — Needs confirmation: how the rest are handled; the result message appears as a toast. |
| AC-04.5 | Upload exceeding 1 MB — rejected by the uploader before submitting. |
9. User Scenarios
| Role | Scenario |
|---|---|
| Admin | Filters “Unused” files and then bulk deletes them |
| Admin | Searches for an old logo by filename to see its preview |
| Owner | Sees which files were uploaded by a particular user |
| Admin | Switches to grid view to browse product images visually |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View File List | settings:file:list:any | — |
| Search and Filter Files | settings:file:list:any | — |
| Preview File | settings:file:list:any | — |
| Delete File | settings:file:delete:any | — |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- Company — the company logo is stored as a file.
- Users — file uploaders and user avatars.
- Other modules that use the uploader (products, and others).
Effects on other modules
- Deleting a file that is in use can cause images/attachments in other modules to disappear (see US-04).