개정판 6cc3aca7
issue #0000
pdf 보안 문제로 Notice upload 포멧 변경
- pdf -> png,gif,jpg,bmp
Change-Id: I0f74b70ba63103c1f11caf6ae15c0f724165b126
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
1856 | 1856 |
string noticePath = Path.Combine(Globals.ProgramDataFolder, "NoticeFiles"); |
1857 | 1857 |
string noticeFileFullName = Path.Combine(noticePath, $"{notiFileInfo.FileID}{notiFileInfo.FileExtension}"); |
1858 | 1858 |
|
1859 |
System.IO.FileInfo finfo = new System.IO.FileInfo(noticeFileFullName);
|
|
1859 |
FileInfo finfo = new FileInfo(noticeFileFullName);
|
|
1860 | 1860 |
|
1861 | 1861 |
if (!finfo.Directory.Exists) |
1862 | 1862 |
{ |
... | ... | |
1951 | 1951 |
return "image/jpeg"; |
1952 | 1952 |
case ".png": |
1953 | 1953 |
return "image/png"; |
1954 |
case ".bmp": |
|
1955 |
return "image/bmp"; |
|
1956 |
case ".gif": |
|
1957 |
return "image/gif"; |
|
1954 | 1958 |
default: |
1955 | 1959 |
return "application/octet-stream"; |
1956 | 1960 |
} |
... | ... | |
1958 | 1962 |
|
1959 | 1963 |
using (OpenFileDialog ofd = new OpenFileDialog() |
1960 | 1964 |
{ |
1961 |
Filter = "PDF files (*.pdf)|*.pdf|All files (*.*)|*.*", |
|
1962 |
//Title = "Open an Excel File", |
|
1963 |
RestoreDirectory = true |
|
1965 |
//Filter = "PDF files (*.pdf)|*.pdf|All files (*.*)|*.*", |
|
1966 |
Filter = "All Images Files (*.png;*.jpeg;*.gif;*.jpg;*.bmp)|*.png;*.jpeg;*.gif;*.jpg;*.bmp" |
|
1967 |
+ "|PNG Portable Network Graphics (*.png)|*.png" |
|
1968 |
+"|JPEG File Interchange Format (*.jpg *.jpeg *jfif)|*.jpg;*.jpeg;*.jfif" |
|
1969 |
+ "|BMP Windows Bitmap (*.bmp)|*.bmp" |
|
1970 |
+ "|GIF Graphics Interchange Format (*.gif)|*.gif", |
|
1971 |
//Title = "Open an Excel File", |
|
1972 |
RestoreDirectory = true |
|
1964 | 1973 |
}) |
1965 | 1974 |
{ |
1966 | 1975 |
try |
1967 | 1976 |
{ |
1968 | 1977 |
if (ofd.ShowDialog() == DialogResult.OK) |
1969 | 1978 |
{ |
1970 |
System.IO.FileInfo fileInfo = new System.IO.FileInfo(ofd.FileName);
|
|
1979 |
FileInfo fileInfo = new FileInfo(ofd.FileName);
|
|
1971 | 1980 |
if (fileInfo.Exists) |
1972 | 1981 |
{ |
1973 | 1982 |
AttFileInfo attFile = new AttFileInfo() |
내보내기 Unified diff