feat: add error handling to bimg
Some checks failed
/ build-and-push-image (push) Failing after 27s

This commit is contained in:
log101 2024-07-29 22:47:01 +03:00
parent 16b16cb464
commit e244fcb334

View File

@ -71,8 +71,10 @@ func main() {
imageName := strings.Split(file.Filename, ".")[0]
imagePath := fmt.Sprintf("./public/%s.webp", imageName)
imageURL := fmt.Sprintf("%s.webp", imageName)
bimg.Write(imagePath, newImage)
err = bimg.Write(imagePath, newImage)
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
// Generate public uri for the image
chars := uniuri.StdChars[26:52]
randomUri := uniuri.NewLenChars(10, chars)
@ -132,6 +134,6 @@ func main() {
})
})
app.Listen(":3000")
app.Listen(":3456")
}