@ccci/micro-server 1.0.216 → 1.0.217
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/dist/index.js +8 -0
- package/dist/utils/Uploader.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -303354,6 +303354,14 @@ class Uploader {
|
|
|
303354
303354
|
throw error;
|
|
303355
303355
|
}
|
|
303356
303356
|
}
|
|
303357
|
+
async delete(bucketName, objectName, removeOpts) {
|
|
303358
|
+
try {
|
|
303359
|
+
const result = await Uploader.client.removeObject(bucketName, objectName, removeOpts);
|
|
303360
|
+
return result;
|
|
303361
|
+
} catch (error) {
|
|
303362
|
+
throw error;
|
|
303363
|
+
}
|
|
303364
|
+
}
|
|
303357
303365
|
}
|
|
303358
303366
|
|
|
303359
303367
|
// src/utils/Mailer.ts
|
package/dist/utils/Uploader.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { UploadedFile } from 'express-fileupload';
|
|
|
2
2
|
import * as minio from 'minio';
|
|
3
3
|
import { ApplicationOptionType } from '..';
|
|
4
4
|
import { UploadedFileType } from '@/types/UploadedFileType';
|
|
5
|
+
import { RemoveOptions } from 'minio';
|
|
5
6
|
export default class Uploader {
|
|
6
7
|
static client: minio.Client;
|
|
7
8
|
constructor();
|
|
@@ -27,5 +28,6 @@ export default class Uploader {
|
|
|
27
28
|
* @param file {string} file directory
|
|
28
29
|
*/
|
|
29
30
|
preview(bucket: string, file: string): Promise<void>;
|
|
31
|
+
delete(bucketName: string, objectName: string, removeOpts?: RemoveOptions): Promise<void>;
|
|
30
32
|
}
|
|
31
33
|
//# sourceMappingURL=Uploader.d.ts.map
|