(media: any)
| 235 | this.cleanupFiles([inputPath, outputPath]); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | private prepareMediaPaths(media: any) { |
| 240 | const extension = this.getExtensionFromMedia(media); |
| 241 | const uniqueId = `${Date.now().toString(36)}_${Math.random() |
| 242 | .toString(36) |
| 243 | .slice(2, 8)}`; |
| 244 | const inputPath = path.join( |
| 245 | FAN_TEMP_DIR, |
| 246 | `fan_src_${uniqueId}${extension}` |
| 247 | ); |
| 248 | const outputPath = path.join( |
| 249 | FAN_TEMP_DIR, |
| 250 | `fan_flip_${uniqueId}${extension}` |
| 251 | ); |
| 252 | const isGif = this.isGifMedia(media); |
| 253 | const isWebm = this.isWebmMedia(media); |
| 254 | const isWebp = extension === '.webp'; |
| 255 | |
| 256 | return { inputPath, outputPath, isGif, isWebm, isWebp }; |
| 257 | } |
| 258 |
no test coverage detected