|
@@ -388,14 +388,15 @@ class FileUploader {
|
|
|
await io.File(encryptedFilePath).delete();
|
|
|
}
|
|
|
final encryptedFile = io.File(encryptedFilePath);
|
|
|
- final fileAttributes = await CryptoUtil.encryptFile(
|
|
|
+ final EncryptionResult fileAttributes = await CryptoUtil.encryptFile(
|
|
|
mediaUploadData!.sourceFile!.path,
|
|
|
encryptedFilePath,
|
|
|
key: key,
|
|
|
);
|
|
|
final thumbnailData = mediaUploadData.thumbnail;
|
|
|
|
|
|
- final encryptedThumbnailData = await CryptoUtil.encryptChaCha(
|
|
|
+ final EncryptionResult encryptedThumbnailData =
|
|
|
+ await CryptoUtil.encryptChaCha(
|
|
|
thumbnailData!,
|
|
|
fileAttributes.key!,
|
|
|
);
|
|
@@ -480,6 +481,7 @@ class FileUploader {
|
|
|
await encryptedThumbnailFile.length(),
|
|
|
encryptedMetadata,
|
|
|
metadataDecryptionHeader,
|
|
|
+ pubMetadata: pubMetadataRequest,
|
|
|
);
|
|
|
if (mediaUploadData.isDeleted) {
|
|
|
_logger.info("File found to be deleted");
|