s3-client-dtb 1.2.1 → 1.2.2
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 +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Se conecta a un backend remoto mediante HTTP. **Ideal para:**
|
|
|
35
35
|
- ✅ Sanitización de rutas (protección contra path traversal)
|
|
36
36
|
- ✅ Metadata de archivos
|
|
37
37
|
- ✅ Listado y paginación
|
|
38
|
+
- ✅ Eliminación en cascada de directorios (deleteDirectory)
|
|
38
39
|
- ✅ Compatible con Node.js puro y NestJS
|
|
39
40
|
- ✅ TypeScript con tipos completos
|
|
40
41
|
|
|
@@ -424,7 +425,8 @@ new StorageClient({
|
|
|
424
425
|
import 'dotenv/config'; // Cargar variables de entorno
|
|
425
426
|
import { createClientFromConfig } from 's3-client-dtb';
|
|
426
427
|
import {
|
|
427
|
-
FileNotFoundError,
|
|
428
|
+
FileNotFoundError,
|
|
429
|
+
DirectoryNotFoundError,
|
|
428
430
|
UploadError,
|
|
429
431
|
StorageError
|
|
430
432
|
} from 's3-client-dtb';
|
|
@@ -670,6 +672,10 @@ export class FilesService {
|
|
|
670
672
|
async downloadFile(path: string) {
|
|
671
673
|
return this.storage.downloadFile(path);
|
|
672
674
|
}
|
|
675
|
+
|
|
676
|
+
async deleteDirectory(directoryPath: string) {
|
|
677
|
+
return this.storage.deleteDirectory(directoryPath);
|
|
678
|
+
}
|
|
673
679
|
}
|
|
674
680
|
```
|
|
675
681
|
|