您最多选择25个主题
主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
60 行
1.9 KiB
60 行
1.9 KiB
using System; |
|
using System.Collections.Generic; |
|
using System.IO; |
|
using System.Linq; |
|
using System.Web; |
|
|
|
namespace Teknik.Configuration |
|
{ |
|
public class UploadConfig |
|
{ |
|
public bool UploadEnabled { get; set; } |
|
public bool DownloadEnabled { get; set; } |
|
// Max upload size in bytes |
|
public long MaxUploadSize { get; set; } |
|
// Max Upload Size for basic users |
|
public long MaxUploadSizeBasic { get; set; } |
|
// Max Upload Size for premium users |
|
public long MaxUploadSizePremium { get; set; } |
|
// 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; } |
|
public int DeleteKeyLength { get; set; } |
|
public int KeySize { get; set; } |
|
public int BlockSize { get; set; } |
|
public bool IncludeExtension { get; set; } |
|
// The size of the chunk that the file will be encrypted/decrypted in (bytes) |
|
public int ChunkSize { get; set; } |
|
// Virus Scanning Settings |
|
public bool VirusScanEnable { get; set; } |
|
public string ClamServer { get; set; } |
|
public int ClamPort { get; set; } |
|
|
|
public UploadConfig() |
|
{ |
|
SetDefaults(); |
|
} |
|
|
|
public void SetDefaults() |
|
{ |
|
UploadEnabled = true; |
|
DownloadEnabled = true; |
|
MaxUploadSize = 100000000; |
|
MaxUploadSizeBasic = 100000000; |
|
MaxUploadSizePremium = 100000000; |
|
UploadDirectory = Directory.GetCurrentDirectory(); |
|
FileExtension = "enc"; |
|
UrlLength = 5; |
|
DeleteKeyLength = 24; |
|
KeySize = 256; |
|
BlockSize = 128; |
|
IncludeExtension = true; |
|
ChunkSize = 1024; |
|
VirusScanEnable = false; |
|
ClamServer = "localhost"; |
|
ClamPort = 3310; |
|
} |
|
} |
|
} |