Skip to content

Commit

Permalink
Update Content-Type header in files.go
Browse files Browse the repository at this point in the history
  • Loading branch information
minpeter committed Apr 29, 2024
1 parent ebe8b24 commit 3c81605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (rs FilesRessources) ViewFile(w http.ResponseWriter, r *http.Request) {
}

defer file.Close()
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", mimeType)
// file를 읽어서 response에 쓰기
if _, err := io.Copy(w, file); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
Expand Down

0 comments on commit 3c81605

Please sign in to comment.