Browse Source

Changed no download limit to be Premium feature only

tags/3.0.0
Teknikode 2 years ago
parent
commit
a22f3b3fd9
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Teknik/Areas/Upload/Controllers/UploadController.cs

+ 3
- 3
Teknik/Areas/Upload/Controllers/UploadController.cs View File

@@ -142,7 +142,7 @@ namespace Teknik.Areas.Upload.Controllers
string iv = string.Empty;
string contentType = string.Empty;
long contentLength = 0;
bool userUploaded = false;
bool premiumAccount = false;
DateTime dateUploaded = new DateTime();

using (TeknikEntities db = new TeknikEntities())
@@ -161,7 +161,7 @@ namespace Teknik.Areas.Upload.Controllers
contentType = uploads.ContentType;
contentLength = uploads.ContentLength;
dateUploaded = uploads.DateUploaded;
userUploaded = uploads.User != null;
premiumAccount = uploads.User != null && uploads.User.AccountType == AccountType.Premium;
}
else
{
@@ -182,7 +182,7 @@ namespace Teknik.Areas.Upload.Controllers

return View(model);
}
else if (!userUploaded && Config.UploadConfig.MaxDownloadSize < contentLength)
else if (!premiumAccount && Config.UploadConfig.MaxDownloadSize < contentLength)
{
// We want to force them to the dl page due to them being over the max download size for embedded content
DownloadViewModel model = new DownloadViewModel();

Loading…
Cancel
Save