feat(upload): detect and specify mime type for files uploaded to S3 and OSS (fix#1681)

This commit is contained in:
Aaron Liu
2023-05-25 19:51:51 +08:00
parent 4aafe1dc7a
commit 89ee147961
5 changed files with 22 additions and 9 deletions

View File

@@ -408,7 +408,7 @@ func (service *FileIDService) PutContent(ctx context.Context, c *gin.Context) se
}
fileData := fsctx.FileStream{
MIMEType: c.Request.Header.Get("Content-Type"),
MimeType: c.Request.Header.Get("Content-Type"),
File: c.Request.Body,
Size: fileSize,
Mode: fsctx.Overwrite,