上传设置header
This commit is contained in:
parent
5b4d94e905
commit
253de366db
@ -37,6 +37,7 @@ func OssUpload(url, filePath string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.Header.Set("Content-Type", "video/mp4")
|
||||
req.Header.Set("Content-Length", fmt.Sprintf("%d", len(fileBytes)))
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
|
Loading…
x
Reference in New Issue
Block a user