Skip to content
Snippets Groups Projects
Commit fd0ceadd authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Improved upload API

parent 75fd85d4
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ func pageImageDetail(ctx PageContext) http.Handler { ...@@ -65,7 +65,7 @@ func pageImageDetail(ctx PageContext) http.Handler {
} }
for _, definition := range ctx.Config.Sizes { for _, definition := range ctx.Config.Sizes {
err := os.Remove(path.Join(ctx.Config.TargetFolder, fmt.Sprintf("%s%s", info.Id, definition.Suffix))) err := os.Remove(path.Join(ctx.Config.TargetFolder, fmt.Sprintf("%s%s", info.Id, definition.Suffix)))
if !os.IsNotExist(err) { if err != nil && !os.IsNotExist(err) {
panic(err) panic(err)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment