2015-12-21 09:58:09 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-01-26 05:54:53 +01:00
|
|
|
|
using System.IO;
|
2015-12-21 09:58:09 +01:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
|
|
|
|
|
namespace Teknik.Configuration
|
|
|
|
|
{
|
|
|
|
|
public class UploadConfig
|
|
|
|
|
{
|
2016-01-29 00:24:12 +01:00
|
|
|
|
public bool UploadEnabled { get; set; }
|
|
|
|
|
public bool DownloadEnabled { get; set; }
|
2015-12-21 09:58:09 +01:00
|
|
|
|
// Max upload size in bytes
|
2016-10-29 01:35:08 +02:00
|
|
|
|
public long MaxUploadSize { get; set; }
|
2016-01-18 07:05:20 +01:00
|
|
|
|
// Location of the upload directory
|
|
|
|
|
public string UploadDirectory { get; set; }
|
|
|
|
|
// File Extension for saved files
|
|
|
|
|
public string FileExtension { get; set; }
|
|
|
|
|
public int UrlLength { get; set; }
|
2016-01-21 07:58:45 +01:00
|
|
|
|
public int DeleteKeyLength { get; set; }
|
|
|
|
|
public int KeySize { get; set; }
|
2016-01-21 19:52:04 +01:00
|
|
|
|
public int BlockSize { get; set; }
|
2016-01-18 07:05:20 +01:00
|
|
|
|
public bool IncludeExtension { get; set; }
|
2016-01-20 01:34:40 +01:00
|
|
|
|
// The size of the chunk that the file will be encrypted/decrypted in (bytes)
|
|
|
|
|
public int ChunkSize { get; set; }
|
2016-05-09 04:04:20 +02:00
|
|
|
|
// Virus Scanning Settings
|
|
|
|
|
public bool VirusScanEnable { get; set; }
|
|
|
|
|
public string ClamServer { get; set; }
|
|
|
|
|
public int ClamPort { get; set; }
|
2015-12-21 09:58:09 +01:00
|
|
|
|
|
|
|
|
|
public UploadConfig()
|
|
|
|
|
{
|
|
|
|
|
SetDefaults();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetDefaults()
|
|
|
|
|
{
|
2016-01-29 00:24:12 +01:00
|
|
|
|
UploadEnabled = true;
|
|
|
|
|
DownloadEnabled = true;
|
2015-12-21 09:58:09 +01:00
|
|
|
|
MaxUploadSize = 100000000;
|
2016-01-26 05:54:53 +01:00
|
|
|
|
UploadDirectory = Directory.GetCurrentDirectory();
|
2016-01-18 07:05:20 +01:00
|
|
|
|
FileExtension = "enc";
|
2016-01-23 01:44:07 +01:00
|
|
|
|
UrlLength = 5;
|
2016-01-21 07:58:45 +01:00
|
|
|
|
DeleteKeyLength = 24;
|
2016-01-21 19:52:04 +01:00
|
|
|
|
KeySize = 256;
|
|
|
|
|
BlockSize = 128;
|
2016-01-18 07:05:20 +01:00
|
|
|
|
IncludeExtension = true;
|
2016-01-20 01:34:40 +01:00
|
|
|
|
ChunkSize = 1024;
|
2016-05-09 04:04:20 +02:00
|
|
|
|
VirusScanEnable = false;
|
|
|
|
|
ClamServer = "localhost";
|
|
|
|
|
ClamPort = 3310;
|
2015-12-21 09:58:09 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|