Skip to content

Commit

Permalink
fix: Screenshots correct directory and return link
Browse files Browse the repository at this point in the history
  • Loading branch information
konotorii committed Jun 20, 2024
1 parent ebc8965 commit e9b97d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ func postImage(c *gin.Context) {
consola.Log(file.Filename)

// Upload the file to specific dst.
err := c.SaveUploadedFile(file, "/public/ss")
err := c.SaveUploadedFile(file, "/public/screenshots")
if err != nil {
consola.Error(err)
c.Status(500)
}

c.JSON(200, fmt.Sprintf("{\"url\":\"https://img.kono.services/ss/%s\"}", file.Filename))
c.JSON(200, gin.H{"url": fmt.Sprintf("https://img.kono.services/img?path=screenshots/%p", file.Filename)})
} else {
c.Status(400)
}
Expand Down

0 comments on commit e9b97d7

Please sign in to comment.