diff --git a/controllers/threads_controller.go b/controllers/threads_controller.go index 463d1ba..877a71e 100644 --- a/controllers/threads_controller.go +++ b/controllers/threads_controller.go @@ -151,6 +151,7 @@ func CreateThread(c *gin.Context) { path := filepath.Join( Utils.UPLOADS_DIR_PATH, strconv.Itoa(postID), + "o", strconv.Itoa(fileID)+"."+file.Ext, ) err = c.SaveUploadedFile(fileInRequest, path) @@ -247,6 +248,7 @@ func UpdateThread(c *gin.Context) { path := filepath.Join( Utils.UPLOADS_DIR_PATH, strconv.Itoa(threadID), + "o", strconv.Itoa(fileID)+"."+file.Ext, ) err = c.SaveUploadedFile(fileInRequest, path) diff --git a/templates/index.html b/templates/index.html index e4d6427..aa12f20 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,7 +24,7 @@ {{ if gt $length 0 }} {{ $FirstFile := index $Post.Files 0 }} diff --git a/templates/thread.html b/templates/thread.html index 85d4011..ee2db63 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -31,9 +31,9 @@