Compare commits

..

No commits in common. "d913e0f7b245241ed5353a3329791f856dbbfcd8" and "09c9ab8614d499cfcc6ba6453cdb90bd4498def5" have entirely different histories.

1 changed files with 1 additions and 8 deletions

View File

@ -2003,16 +2003,9 @@ func (s *S5API) downloadFile(jc jape.Context) {
detectedType, err := mimetype.DetectReader(file) detectedType, err := mimetype.DetectReader(file)
if err != nil { if err != nil {
s.logger.Error("error detecting mime type", zap.Error(err)) s.logger.Error("error detecting mime type", zap.Error(err))
_ = jc.Error(err, http.StatusInternalServerError)
return
} }
_ = jc.Error(err, http.StatusInternalServerError)
mimeType = detectedType.String() mimeType = detectedType.String()
_, err = file.Seek(0, io.SeekStart)
if err != nil {
s.logger.Error("error seeking file", zap.Error(err))
_ = jc.Error(err, http.StatusInternalServerError)
return
}
} }
if len(mimeType) == 0 { if len(mimeType) == 0 {