(file?: formidable.File | formidable.File[])
| 16 | } |
| 17 | |
| 18 | export function clearUploadFiles(file?: formidable.File | formidable.File[]) { |
| 19 | if (!file) return; |
| 20 | if (file instanceof Array) { |
| 21 | file.forEach((v) => { |
| 22 | fs.remove(v.filepath, () => {}); |
| 23 | }); |
| 24 | } else { |
| 25 | fs.remove(file.filepath, () => {}); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | export function normalizedJoin(...paths: string[]) { |
| 30 | if (os.platform() === "win32") { |