s3: improve upload limit checks

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

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)