Dispose temp file

This commit is contained in:
Ali
2021-02-26 19:40:41 +04:00
parent 4ee5f8487a
commit e24920ae88
2 changed files with 7 additions and 2 deletions

View File

@@ -258,7 +258,7 @@ private final class ImportManager {
if !pathExtension.isEmpty, let value = TGMimeTypeMap.mimeType(forExtension: pathExtension) {
mimeType = value
}
return ChatHistoryImport.uploadMedia(account: account, session: session, file: tempFile, fileName: entry.0.path, mimeType: mimeType, type: entry.2)
return ChatHistoryImport.uploadMedia(account: account, session: session, file: tempFile, disposeFileAfterDone: true, fileName: entry.0.path, mimeType: mimeType, type: entry.2)
|> mapError { error -> ImportError in
switch error {
case .chatAdminRequired: