The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

Index.cshtml 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. @model Teknik.Areas.Upload.ViewModels.UploadViewModel
  2. @using Teknik.Helpers
  3. <script>
  4. var encScriptSrc = '@Scripts.Url("~/bundles/cryptoWorker")';
  5. var aesScriptSrc = '@Scripts.Url("~/bundles/crypto")';
  6. var generateDeleteKeyURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action= "GenerateDeleteKey" })';
  7. var saveKeyToServerURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action= "SaveFileKey" })';
  8. var removeKeyFromServerURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action= "RemoveFileKey" })';
  9. var uploadFileURL = '@Url.SubRouteUrl(Model.CurrentSub, "Upload.Action", new { action = "Upload" })';
  10. var maxUploadSize = @Model.Config.UploadConfig.MaxUploadSize;
  11. var chunkSize = @Model.Config.UploadConfig.ChunkSize;
  12. var keySize = @Model.Config.UploadConfig.KeySize;
  13. var blockSize = @Model.Config.UploadConfig.BlockSize;
  14. var shortenURL = '@Url.SubRouteUrl("shorten", "Shortener.Action", new { action= "ShortenUrl" })';
  15. </script>
  16. @Styles.Render("~/Content/upload")
  17. <div class="container">
  18. <div class="row text-center">
  19. <div class="col-sm-8 col-sm-offset-2">
  20. <div class="row text-center">
  21. <div class="well well-lg text-center" id="uploadButton" style="cursor: pointer">
  22. <div class="row">
  23. <div class="col-sm-12">
  24. <h1>Drop your files here</h1>
  25. </div>
  26. </div>
  27. <div class="row">
  28. <div class="col-sm-12">
  29. <h2>Or just click here</h2>
  30. </div>
  31. </div>
  32. <div class="row">
  33. <div class="col-sm-12">
  34. <h3>Your Choice</h3>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="col-sm-2">
  41. <div class="row">
  42. <div class="col-sm-12">
  43. <label for="saveKey">Save Key</label>
  44. <input type="checkbox" name="saveKey" id="saveKey" @(Model.SaveKey ? "checked" : string.Empty) />
  45. </div>
  46. </div>
  47. <div class="row">
  48. <div class="col-sm-12">
  49. <label for="serverSideEncrypt">Encrypt Server Side</label>
  50. <input type="checkbox" name="serverSideEncrypt" id="serverSideEncrypt" @(Model.ServerSideEncrypt ? "checked" : string.Empty) ; />
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <br />
  56. <div class="container" id="upload-links">
  57. </div>
  58. <br />
  59. <div class="well text-center">
  60. <p>
  61. Each file is encrypted on upload using an AES-256-CTR cipher.
  62. </p>
  63. <p>
  64. To view the file decrypted, you must use the direct Teknik link in a javascript enabled browser or save the key to the server.
  65. </p>
  66. <p>
  67. The maximum file size per upload is <b>@Utility.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSize)</b>
  68. </p>
  69. </div>
  70. <div class="text-center">
  71. Useful Tools: <a href="@Url.SubRouteUrl("help", "Help.Tools")">Upload Scripts and Utilities</a>
  72. </div>
  73. </div>
  74. @Scripts.Render("~/bundles/upload")