More jpeg file extensions.

This commit is contained in:
Azareal 2019-10-30 18:16:19 +10:00
parent 00634896ec
commit e9cf06a5f2
3 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ type StringList []string
// TODO: Let admins manage this from the Control Panel
// apng is commented out for now, as we have no way of re-encoding it into a smaller file
var AllowedFileExts = StringList{
"png", "jpg", "jpeg","jfif", "svg", "bmp", "gif", "tiff","tif", "webp", /*"apng",*/ // images
"png", "jpg", "jpe","jpeg","jif","jfi","jfif", "svg", "bmp", "gif", "tiff","tif", "webp", /*"apng",*/ // images
"txt", "xml", "json", "yaml", "toml", "ini", "md", "html", "rtf", "js", "py", "rb", "css", "scss", "less", "eqcss", "pcss", "java", "ts", "cs", "c", "cc", "cpp", "cxx", "C", "c++", "h", "hh", "hpp", "hxx", "h++", "rs", "rlib", "htaccess", "gitignore", /*"go","php",*/ // text
@ -66,7 +66,7 @@ var AllowedFileExts = StringList{
"otf", "woff2", "woff", "ttf", "eot", // fonts
}
var ImageFileExts = StringList{
"png", "jpg", "jpeg","jfif", "svg", "bmp", "gif", "tiff","tif", "webp", /* "apng",*/
"png", "jpg", "jpe","jpeg","jif","jfi","jfif", "svg", "bmp", "gif", "tiff","tif", "webp", /* "apng",*/
}
var ArchiveFileExts = StringList{
"bz2", "zip", "gz", "7z", "tar", "cab",

View File

@ -49,7 +49,7 @@ func ThumbTask(thumbChan chan bool) {
/*if user.RawAvatar == ".gif" {
return nil
}*/
if user.RawAvatar != ".png" && user.RawAvatar != ".jpg" && user.RawAvatar != ".jpeg" && user.RawAvatar != ".jfif" && user.RawAvatar != ".gif" && user.RawAvatar != "tiff" && user.RawAvatar != "tif" {
if user.RawAvatar != ".png" && user.RawAvatar != ".jpg" && user.RawAvatar != ".jpe" && user.RawAvatar != ".jpeg" && user.RawAvatar != ".jif" && user.RawAvatar != ".jfi" && user.RawAvatar != ".jfif" && user.RawAvatar != ".gif" && user.RawAvatar != "tiff" && user.RawAvatar != "tif" {
return nil
}

View File

@ -1,5 +1,5 @@
// TODO: Push ImageFileExts to the client from the server in some sort of gen.js?
var imageExts = ["png", "jpg", "jpeg","jfif", "svg", "bmp", "gif", "tiff","tif", "webp"];
var imageExts = ["png", "jpg", "jpe","jpeg","jif","jfi","jfif", "svg", "bmp", "gif", "tiff","tif", "webp"];
(() => {
addInitHook("almost_end_init", () => {