Save files to cache with the extension
This commit is contained in:
parent
eb813699f0
commit
6d8e7c1a43
1 changed files with 3 additions and 1 deletions
|
@ -152,7 +152,9 @@ Future<io.File> _downloadAndDecrypt(File file, BaseCacheManager cacheManager,
|
|||
final data =
|
||||
await CryptoUtil.decryptFileToData(temporaryPath, file.getPassword());
|
||||
io.File(temporaryPath).deleteSync();
|
||||
return cacheManager.putFile(file.getDownloadUrl(), data);
|
||||
final fileExtension = extension(file.title).substring(1).toLowerCase();
|
||||
return cacheManager.putFile(file.getDownloadUrl(), data,
|
||||
fileExtension: fileExtension);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue