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.4KB

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