Browse Source

Fixed Download page not using current subdomain as link.

tags/3.0.0
Teknikode 1 year ago
parent
commit
aacc07d4a1

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

@@ -172,6 +172,7 @@ namespace Teknik.Areas.Upload.Controllers
if (string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(iv))
{
DownloadViewModel model = new DownloadViewModel();
model.CurrentSub = Subdomain;
model.FileName = file;
model.ContentType = contentType;
model.ContentLength = contentLength;

+ 3
- 2
Teknik/Areas/Upload/ViewModels/DownloadViewModel.cs View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@@ -8,6 +8,7 @@ namespace Teknik.Areas.Upload.ViewModels
{
public class DownloadViewModel : ViewModelBase
{
public string CurrentSub { get; set; }
public string FileName { get; set; }
public string ContentType { get; set; }
public long ContentLength { get; set; }
@@ -15,4 +16,4 @@ namespace Teknik.Areas.Upload.ViewModels
public int keySize { get; set; }
public int blockSize { get; set; }
}
}
}

+ 1
- 1
Teknik/Areas/Upload/Views/Upload/Download.cshtml View File

@@ -5,7 +5,7 @@
<script nonce="@Context.Items[Constants.NONCE_KEY]">
var encScriptSrc = '@Scripts.Url("~/bundles/cryptoWorker")';
var aesScriptSrc = '@Scripts.Url("~/bundles/crypto")';
var downloadDataUrl = '@Url.SubRouteUrl("upload", "Upload.Action", new { action = "DownloadData" })';
var downloadDataUrl = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action = "DownloadData" })';
var fileName = '@Model.FileName';
var fileType = '@Model.ContentType';
var iv = '@Model.IV';

Loading…
Cancel
Save