The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

79 lines
3.3 KiB

@model Teknik.Areas.Upload.ViewModels.UploadViewModel
@using Teknik.Utilities
<script>
var encScriptSrc = '@Scripts.Url("~/bundles/cryptoWorker")';
var aesScriptSrc = '@Scripts.Url("~/bundles/crypto")';
var generateDeleteKeyURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action= "GenerateDeleteKey" })';
var saveKeyToServerURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action= "SaveFileKey" })';
var removeKeyFromServerURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action= "RemoveFileKey" })';
var uploadFileURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action = "Upload" })';
var maxUploadSize = @Model.Config.UploadConfig.MaxUploadSize;
var chunkSize = @Model.Config.UploadConfig.ChunkSize;
var keySize = @Model.Config.UploadConfig.KeySize;
var blockSize = @Model.Config.UploadConfig.BlockSize;
var shortenURL = '@Url.SubRouteUrl("shorten", "Shortener.Action", new { action= "ShortenUrl" })';
</script>
@Styles.Render("~/Content/upload")
<div class="container">
<div class="row text-center">
<div class="col-sm-8 col-sm-offset-2">
<div class="row text-center">
<div class="well well-lg text-center" id="uploadButton" style="cursor: pointer">
<div class="row">
<div class="col-sm-12">
<h1>Drop your files here</h1>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h2>Or just click here</h2>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3>Your Choice</h3>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="row">
<div class="col-sm-12">
<label for="saveKey">Save Key</label>
<input type="checkbox" name="saveKey" id="saveKey" @(Model.SaveKey ? "checked" : string.Empty) />
</div>
</div>
<div class="row">
<div class="col-sm-12">
<label for="serverSideEncrypt">Encrypt Server Side</label>
<input type="checkbox" name="serverSideEncrypt" id="serverSideEncrypt" @(Model.ServerSideEncrypt ? "checked" : string.Empty) />
</div>
</div>
</div>
</div>
<br />
<div class="container" id="upload-links">
</div>
<br />
<div class="well text-center">
<p>
Each file is encrypted on upload using an AES-256-CTR cipher.
</p>
<p>
To view the file decrypted, you must use the direct Teknik link in a javascript enabled browser or save the key to the server.
</p>
<p>
The maximum file size per upload is <b>@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSize)</b>
</p>
</div>
<div class="text-center">
Useful Tools: <a href="@Url.SubRouteUrl("help", "Help.Tools")">Upload Scripts and Utilities</a>
</div>
</div>
@Scripts.Render("~/bundles/upload")