-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathFilesStatus.ashx.cs
More file actions
35 lines (29 loc) · 1.1 KB
/
FilesStatus.ashx.cs
File metadata and controls
35 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.IO;
namespace jQueryUploadTest {
public class FilesStatus {
public const string HandlerPath = "/";
public string group { get; set; }
public string name { get; set; }
public string type { get; set; }
public int size { get; set; }
public string progress { get; set; }
public string url { get; set; }
public string thumbnail_url { get; set; }
public string delete_url { get; set; }
public string delete_type { get; set; }
public string error { get; set; }
public FilesStatus () { }
public FilesStatus (FileInfo fileInfo) { SetValues(fileInfo.Name, (int)fileInfo.Length); }
public FilesStatus (string fileName, int fileLength) { SetValues(fileName, fileLength); }
private void SetValues (string fileName, int fileLength) {
name = fileName;
type = "image/png";
size = fileLength;
progress = "1.0";
url = HandlerPath + "FileTransferHandler.ashx?f=" + fileName;
thumbnail_url = HandlerPath + "Thumbnail.ashx?f=" + fileName;
delete_url = HandlerPath + "FileTransferHandler.ashx?f=" + fileName;
delete_type = "DELETE";
}
}
}