MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / cleanupTempFile

Method cleanupTempFile

save/save.ts:665–676  ·  view source on GitHub ↗
(filePath: string | null)

Source from the content-addressed store, hash-verified

663
664 await this.moveFile(tempFileInfo.path, finalFilePath);
665 this.activeTempFiles.delete(tempFileInfo.path);
666 tempFileInfo = null;
667
668 const metadataPath = await this.saveLocalMetadata(finalFilePath, {
669 savedAt: new Date().toISOString(),
670 source: {
671 chatId: sourceChatId,
672 chatTitle: displayName,
673 messageId: sourceMessageId,
674 link: this.generateMessageLink(sourceChatId, sourceMessageId),
675 },
676 media: {
677 type: sourceMsg.media ? this.getMediaType(sourceMsg.media) : null,
678 fileName: path.basename(finalFilePath),
679 originalFileName: originalName,

Callers 2

saveMediaToLocalMethod · 0.95
processMessageMethod · 0.95

Calls 2

errorMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected