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.

Index.cshtml 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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(Request.Url.Authority.GetSubdomain(), "Upload.Action", new { action= "GenerateDeleteKey" })';
  7. var saveKeyToServerURL = '@Url.SubRouteUrl(Request.Url.Authority.GetSubdomain(), "Upload.Action", new { action= "SaveFileKey" })';
  8. var removeKeyFromServerURL = '@Url.SubRouteUrl(Request.Url.Authority.GetSubdomain(), "Upload.Action", new { action= "RemoveFileKey" })';
  9. var uploadFileURL = '@Url.SubRouteUrl(Request.Url.Authority.GetSubdomain(), "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. </script>
  15. @Styles.Render("~/Content/upload")
  16. <div class="container">
  17. <div class="row text-center">
  18. <div class="col-sm-8 col-sm-offset-2">
  19. <div class="row text-center">
  20. <div class="well well-lg text-center" id="uploadButton" style="cursor: pointer">
  21. <div class="row">
  22. <div class="col-sm-12">
  23. <h1>Drop your files here</h1>
  24. </div>
  25. </div>
  26. <div class="row">
  27. <div class="col-sm-12">
  28. <h2>Or just click here</h2>
  29. </div>
  30. </div>
  31. <div class="row">
  32. <div class="col-sm-12">
  33. <h3>Your Choice</h3>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="col-sm-2">
  40. <div class="row">
  41. <div class="col-sm-12">
  42. <label for="saveKey">Save Key</label>
  43. <input type="checkbox" name="saveKey" id="saveKey" @(Model.SaveKey ? "checked" : string.Empty) />
  44. </div>
  45. </div>
  46. <div class="row">
  47. <div class="col-sm-12">
  48. <label for="serverSideEncrypt">Encrypt Server Side</label>
  49. <input type="checkbox" name="serverSideEncrypt" id="serverSideEncrypt" @(Model.ServerSideEncrypt ? "checked" : string.Empty) ; />
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <br />
  55. <div class="container" id="upload-links">
  56. </div>
  57. <br />
  58. <div class="well text-center">
  59. <p>
  60. Each file is encrypted on upload using an AES-256-CTR cipher.
  61. </p>
  62. <p>
  63. To view the file decrypted, you must use the direct Teknik link in a javascript enabled browser or save the key to the server.
  64. </p>
  65. <p>
  66. The maximum file size per upload is <b>@Utility.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSize)</b>
  67. </p>
  68. </div>
  69. <div class="text-center">
  70. Useful Tools: <a href="http://git.teknik.io/Teknikode/Tools/src/master/Upload">Upload Scripts and Utilities</a> | <a href="https://github.com/jschx/poomf">Poomf Uploader</a>
  71. <br />
  72. <br />
  73. You can now upload your screenshots automatically using <a href="https://github.com/KittyKatt/screenFetch">Screenfetch</a>!
  74. </div>
  75. </div>
  76. @Scripts.Render("~/bundles/upload")