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.

Download.cshtml 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @model Teknik.Areas.Upload.ViewModels.DownloadViewModel
  2. <script>
  3. var encScriptSrc = '@Scripts.Url("~/bundles/cryptoWorker")';
  4. var aesScriptSrc = '@Scripts.Url("~/bundles/crypto")';
  5. var downloadDataUrl = '@Url.SubRouteUrl("upload", "Upload.Action", new { action = "DownloadData" })';
  6. var fileName = '@Model.FileName';
  7. var fileType = '@Model.ContentType';
  8. var key = window.location.hash.substring(1);
  9. if (key == null)
  10. {
  11. key = '@((Model.Key != null) ? Model.Key : string.Empty)';
  12. }
  13. var iv = '@Model.IV';
  14. var chunkSize = @(Model.Config.UploadConfig.ChunkSize);
  15. </script>
  16. <!-- Add UI for downloading info -->
  17. <div class="container">
  18. <div class="page-header text-center">
  19. <h1><strong>@Model.FileName</strong></h1>
  20. </div>
  21. <div class="row">
  22. <div class="col-sm-6 col-sm-offset-3">
  23. <div class="center-block">
  24. <dl class="dl-horizontal">
  25. <dt>Content-Type</dt>
  26. <dd>@Model.ContentType</dd>
  27. <dt>File Size</dt>
  28. <dd>@(Utility.GetBytesReadable(Model.ContentLength))</dd>
  29. </dl>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="row">
  34. <div class="col-sm-12">
  35. <div class="progress" id="progress">
  36. <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 0%">0%</div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. @Scripts.Render("~/bundles/download")