|
@@ -9,7 +9,7 @@ export const upCdn = isProd ? 'https://drive.le5lecdn.com' : '';
|
|
const imageDrive = 'https://drive.le5lecdn.com';
|
|
const imageDrive = 'https://drive.le5lecdn.com';
|
|
//https://v.le5le.com/file/2023/0828/1/1/thumb.07c0a78f.png
|
|
//https://v.le5le.com/file/2023/0828/1/1/thumb.07c0a78f.png
|
|
export async function delImage(image: string) {
|
|
export async function delImage(image: string) {
|
|
- if (image.startsWith('/file')) {
|
|
|
|
|
|
+ if (image.startsWith('/file') || image.startsWith('/api')) {
|
|
await axios.delete(`${image}`);
|
|
await axios.delete(`${image}`);
|
|
} else if (image.startsWith(upCdn) || image.startsWith(imageDrive)) {
|
|
} else if (image.startsWith(upCdn) || image.startsWith(imageDrive)) {
|
|
await axios.delete('/file' + image.replace(upCdn || imageDrive, ''));
|
|
await axios.delete('/file' + image.replace(upCdn || imageDrive, ''));
|