Save files to cache with the extension
This commit is contained in:
parent
eb813699f0
commit
6d8e7c1a43
|
@ -152,7 +152,9 @@ Future<io.File> _downloadAndDecrypt(File file, BaseCacheManager cacheManager,
|
||||||
final data =
|
final data =
|
||||||
await CryptoUtil.decryptFileToData(temporaryPath, file.getPassword());
|
await CryptoUtil.decryptFileToData(temporaryPath, file.getPassword());
|
||||||
io.File(temporaryPath).deleteSync();
|
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…
Reference in a new issue