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.

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Web;
  6. namespace Teknik.Configuration
  7. {
  8. public class UploadConfig
  9. {
  10. // Max upload size in bytes
  11. public int MaxUploadSize { get; set; }
  12. // Location of the upload directory
  13. public string UploadDirectory { get; set; }
  14. // File Extension for saved files
  15. public string FileExtension { get; set; }
  16. public int UrlLength { get; set; }
  17. public int DeleteKeyLength { get; set; }
  18. public int KeySize { get; set; }
  19. public int BlockSize { get; set; }
  20. public bool IncludeExtension { get; set; }
  21. // The size of the chunk that the file will be encrypted/decrypted in (bytes)
  22. public int ChunkSize { get; set; }
  23. public UploadConfig()
  24. {
  25. SetDefaults();
  26. }
  27. public void SetDefaults()
  28. {
  29. MaxUploadSize = 100000000;
  30. UploadDirectory = Directory.GetCurrentDirectory();
  31. FileExtension = "enc";
  32. UrlLength = 5;
  33. DeleteKeyLength = 24;
  34. KeySize = 256;
  35. BlockSize = 128;
  36. IncludeExtension = true;
  37. ChunkSize = 1024;
  38. }
  39. }
  40. }