Browse Source

Fix: Fix upload with pubMetadata

Neeraj Gupta 2 years ago
parent
commit
cc46958f88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/utils/file_uploader_util.dart

+ 1 - 1
lib/utils/file_uploader_util.dart

@@ -198,7 +198,7 @@ Future<MetadataRequest> getPubMetadataRequest(
     fileKey,
   );
   return MetadataRequest(
-    version: file.pubMmdVersion,
+    version: file.pubMmdVersion == 0 ? 1 : file.pubMmdVersion,
     count: jsonToUpdate.length,
     data: CryptoUtil.bin2base64(encryptedMMd.encryptedData!),
     header: CryptoUtil.bin2base64(encryptedMMd.header!),