contented: mime type fix (working)

This commit is contained in:
mappu 2018-06-07 19:39:29 +12:00
parent 382717d082
commit 24c2bfe7fb

View File

@ -121,7 +121,7 @@ func (this *NTFServer) ContentedUploadSync(fileId string, expectSizeBytes int64)
if err != nil { if err != nil {
return "", err return "", err
} }
req.Header.Set("Content-Type", `multipart/form-data`) req.Header.Set("Content-Type", formValues.FormDataContentType()) // it's "multipart/form-data; boundary=xxxx" with a magic string
uploadResp, err := http.DefaultClient.Do(req) uploadResp, err := http.DefaultClient.Do(req)
if err != nil { if err != nil {
return "", fmt.Errorf("Upload failed: %s", err.Error()) return "", fmt.Errorf("Upload failed: %s", err.Error())