Actually use specified directory

This commit is contained in:
Zuckerberg 2023-11-09 22:54:12 -07:00
parent e06f47d2ff
commit 33714fcf17

View File

@ -82,7 +82,7 @@ func fetchImage(w http.ResponseWriter, r *http.Request) {
fmt.Printf("Color code: %d, RGB: %v\n", color.Code, color.Color) fmt.Printf("Color code: %d, RGB: %v\n", color.Code, color.Color)
} }
randomImgFile, _ := getRandomFile("img") randomImgFile, _ := getRandomFile(imageDir)
fmt.Println("Serving random image file:", randomImgFile) fmt.Println("Serving random image file:", randomImgFile)
img := ReadImage(randomImgFile) img := ReadImage(randomImgFile)