1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Changed no download limit to be Premium feature only

This commit is contained in:
Uncled1023 2018-02-03 16:52:01 -08:00
parent ce0ded7c55
commit a22f3b3fd9

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();