mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-03 06:42:09 +08:00
15 lines
449 B
TypeScript
15 lines
449 B
TypeScript
import { getRawData } from '~/utils/common'
|
|
import { removeFileFromS3InMain } from '~/utils/deleteFunc'
|
|
import { deleteFailedLog } from '~/utils/deleteLog'
|
|
|
|
export default class AwsS3Api {
|
|
static async delete(configMap: IStringKeyMap): Promise<boolean> {
|
|
try {
|
|
return await removeFileFromS3InMain(getRawData(configMap))
|
|
} catch (error: any) {
|
|
deleteFailedLog(configMap.fileName, 'AWS S3', error)
|
|
return false
|
|
}
|
|
}
|
|
}
|