directus-extension-storage-manager 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/dist/api.js +1 -1
- package/dist/app.js +2 -2
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Move files between your Directus storages — local disk, S3, Google Cloud, Azur
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
Directus can use several storages at once, but it will not move existing files for you. Storage Manager does: browse each storage, upload, find files that are on disk but not in Directus, move files or whole folders,
|
|
11
|
+
Directus can use several storages at once, but it will not move existing files for you. Storage Manager does: browse each storage, upload, find files that are on disk but not in Directus, move files or whole folders, find File Library entries that nothing uses anymore, and optionally quarantine deletes in a Recycle Bin before permanent removal.
|
|
12
12
|
|
|
13
13
|
When you open a storage from the overview, the left sidebar shows that storage’s folder tree. Folders load as you expand them, so large storages stay quick to navigate.
|
|
14
14
|
|
|
@@ -108,9 +108,26 @@ Set your scan options, then click **Scan**:
|
|
|
108
108
|
|
|
109
109
|
After a scan you get a short summary and a list of matches (same cards/table layouts as elsewhere in Storage Manager). Select files and choose what to do:
|
|
110
110
|
|
|
111
|
+
- **Move to Recycle** — when Recycle Bin is on, quarantine selected files instead of deleting immediately (primary action)
|
|
111
112
|
- **Move to Directus Folder** — organize them in the File Library (virtual folders only)
|
|
112
113
|
- **Move to Storage Folder** — relocate them on disk / cloud storage
|
|
113
|
-
- **Delete** — remove them if they are still unused (each file is checked again before delete)
|
|
114
|
+
- **Delete Permanently** — remove them if they are still unused (each file is checked again before delete)
|
|
115
|
+
|
|
116
|
+
### Recycle Bin
|
|
117
|
+
|
|
118
|
+
Open **Recycle Bin** from the left sidebar for an opt-in File Library quarantine. Files stay registered in Directus, but assets in the recycle folder are blocked from `/assets` for everyone, and the folder is hidden from normal File Library browse/search/picker (unless you open that folder on purpose).
|
|
119
|
+
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+
Turn **On** to create `storage_manager_trashed_at` on `directus_files` and a recycle folder (default **`_Recycle`** — you can pick another File Library folder while Off). Unreferenced Files can move selections here; any other File Library file can be moved into this folder as well when permissions allow.
|
|
123
|
+
|
|
124
|
+
While On you can:
|
|
125
|
+
|
|
126
|
+
- Set **Retention (days)** — how long files stay before they are purge candidates
|
|
127
|
+
- **Dry Run Purge** / **Purge Expired** — permanently delete files older than retention after re-checking that they are still unreferenced
|
|
128
|
+
- **Scheduled Purge** — optionally create a daily Schedule Flow (`0 3 * * *`) that runs **Purge Recycle Bin**. Turning Recycle Bin off pauses a linked Flow; you can open or remove the Flow from this page
|
|
129
|
+
|
|
130
|
+
Source of truth is the folder id. Renaming the folder in the File Library is fine.
|
|
114
131
|
|
|
115
132
|
### File Interfaces
|
|
116
133
|
|
|
@@ -134,7 +151,7 @@ Storage Manager fields can override these defaults per field in Data Model (incl
|
|
|
134
151
|
|
|
135
152
|
### Settings
|
|
136
153
|
|
|
137
|
-
Check for updates, export or import your Mirror settings, or
|
|
154
|
+
Check for updates, export or import your Mirror settings, or **Remove Extension Data** before uninstall. Cleanup clears `directus_settings.storage_manager`, deletes the scheduled purge Flow (if any), and removes the **Unreferenced File Scans** snapshot folder. Recycle Bin files are left alone unless you opt in to empty them.
|
|
138
155
|
|
|
139
156
|
### Flows
|
|
140
157
|
|
|
@@ -142,6 +159,8 @@ The **Storage Manager** Flow operation can move (or copy) **selected file IDs**
|
|
|
142
159
|
|
|
143
160
|
**Scan Unreferenced Files** is a separate Flow operation that runs the same dry-run scan as the module (optional storage filter, min age, text-field scan). It returns `file_ids` (capped list), `unreferenced_count`, `unreferenced_bytes`, and full `meta` so you can chain into migrate or your own follow-up steps. It does not delete anything.
|
|
144
161
|
|
|
162
|
+
**Purge Recycle Bin** permanently deletes expired Recycle Bin files (still-unreferenced only). Retention comes from Recycle Bin settings unless you override **Older Than (Days)**. Use **Dry Run** to count candidates. The Recycle Bin page can install a daily Schedule Flow that runs this operation.
|
|
163
|
+
|
|
145
164
|
## Getting started
|
|
146
165
|
|
|
147
166
|
1. Set up more than one storage if you plan to move files (for example `local` and `s3`).
|
|
@@ -152,8 +171,9 @@ The **Storage Manager** Flow operation can move (or copy) **selected file IDs**
|
|
|
152
171
|
6. At a storage root, open **Thumbnails** in the sidebar if you need to inspect or clear generated image copies.
|
|
153
172
|
7. For collection fields that must land on a specific storage, use **File with Storage**, **Files with Storage**, or **Image with Storage** instead of the native file interfaces.
|
|
154
173
|
8. Use **File Interfaces** to set default cleanup behaviour when editors clear a file field or delete an item (works for native file fields too).
|
|
155
|
-
9. Use **Unreferenced Files** when you want to find leftover File Library entries, then move or delete
|
|
156
|
-
10.
|
|
174
|
+
9. Use **Unreferenced Files** when you want to find leftover File Library entries, then move them to Recycle, relocate, or delete permanently.
|
|
175
|
+
10. Turn on **Recycle Bin** if you want a quarantine step before permanent delete, and optionally create **Scheduled Purge**.
|
|
176
|
+
11. Use **Dry Run**, then **Move**.
|
|
157
177
|
|
|
158
178
|
## Installation
|
|
159
179
|
|