s3: improve upload limit checks

This commit is contained in:
Abdullah Atta committed 2025-10-14 21:16:22 +05:00
1 parent 6e35edb715
commit 50f159a37b
2 files changed
+48 -42

No files matched your search

+2 -2
View File
@@ -39,11 +39,11 @@ namespace Notesnook.API.Helpers
return MAX_FILE_SIZE[subscription.Plan];
}
public static bool IsStorageLimitReached(Subscription subscription, Limit limit)
public static bool IsStorageLimitReached(Subscription subscription, long limit)
{
var storageLimit = GetStorageLimitForPlan(subscription);
if (storageLimit == -1) return false;
return limit.Value > storageLimit;
return limit > storageLimit;
}
public static bool IsFileSizeExceeded(Subscription subscription, long fileSize)