Proper mimetype fix
This commit is contained in:
parent
147f16a262
commit
030d649300
|
@ -54,7 +54,3 @@ routes:
|
|||
extend list, ""
|
||||
extend status, ""
|
||||
extend media, ""
|
||||
|
||||
settings.mimes.register("jpg?name=orig", "image/jpeg")
|
||||
|
||||
runForever()
|
||||
|
|
|
@ -29,7 +29,7 @@ proc getPicUrl*(link: string): string =
|
|||
proc cleanFilename*(filename: string): string =
|
||||
const reg = re"[^A-Za-z0-9._-]"
|
||||
result = filename.replace(reg, "_")
|
||||
if "1500x500" in result:
|
||||
if "1500x500" in result or "name_orig" in result:
|
||||
result &= ".jpg"
|
||||
|
||||
proc filterParams*(params: Table): seq[(string, string)] =
|
||||
|
|
Loading…
Reference in New Issue