Delete encrypted file post download

This commit is contained in:
Neeraj Gupta 2023-10-30 05:39:01 +05:30
parent c2e624d919
commit fda7fe02a9

View file

@ -37,6 +37,8 @@ func (c *ClICtrl) downloadAndDecrypt(
if err != nil {
log.Printf("Error decrypting file %d: %s", file.ID, err)
return nil, model.ErrDecryption
} else {
_ = os.Remove(downloadPath)
}
return &decryptedPath, nil
}