SetFiles set up a multipart form from a map to upload, which key is the parameter name, and value is the file path.
(files map[string]string)
| 290 | // SetFiles set up a multipart form from a map to upload, which |
| 291 | // key is the parameter name, and value is the file path. |
| 292 | func (r *Request) SetFiles(files map[string]string) *Request { |
| 293 | for k, v := range files { |
| 294 | r.SetFile(k, v) |
| 295 | } |
| 296 | return r |
| 297 | } |
| 298 | |
| 299 | // SetFile set up a multipart form from file path to upload, |
| 300 | // which read file from filePath automatically to upload. |