From a6fc129a01bf760aa163c8f842a3f2b67b375e3e Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 16 Jul 2015 12:50:38 -0400 Subject: update file unit tests --- api/file.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'api/file.go') diff --git a/api/file.go b/api/file.go index d6f9e6c1d..4fead4627 100644 --- a/api/file.go +++ b/api/file.go @@ -150,9 +150,8 @@ func fireAndForgetHandleImages(filenames []string, fileData [][]byte, teamId, ch return } - err = writeFile(buf.Bytes(), dest+name+"_thumb.jpg") - if err != nil { - l4g.Error("Unable to upload thumbnail to S3 channelId=%v userId=%v filename=%v err=%v", channelId, userId, filename, err) + if err := writeFile(buf.Bytes(), dest+name+"_thumb.jpg"); err != nil { + l4g.Error("Unable to upload thumbnail channelId=%v userId=%v filename=%v err=%v", channelId, userId, filename, err) return } }() @@ -174,9 +173,8 @@ func fireAndForgetHandleImages(filenames []string, fileData [][]byte, teamId, ch return } - err = writeFile(buf.Bytes(), dest+name+"_preview.jpg") - if err != nil { - l4g.Error("Unable to upload preview to S3 channelId=%v userId=%v filename=%v err=%v", channelId, userId, filename, err) + if err := writeFile(buf.Bytes(), dest+name+"_preview.jpg"); err != nil { + l4g.Error("Unable to upload preview channelId=%v userId=%v filename=%v err=%v", channelId, userId, filename, err) return } }() -- cgit v1.2.3-1-g7c22