Revert one usecase
This commit is contained in:
parent
fede59cfa0
commit
9a36098f5c
1 changed files with 4 additions and 3 deletions
|
@ -1383,9 +1383,10 @@ func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend)
|
||||||
for i, file := range files {
|
for i, file := range files {
|
||||||
h := make(textproto.MIMEHeader)
|
h := make(textproto.MIMEHeader)
|
||||||
h.Set("Content-Disposition",
|
h.Set("Content-Disposition",
|
||||||
`form-data; name="file`+strconv.Itoa(i)+
|
fmt.Sprintf(`form-data; name="file%d"; filename="%s"`,
|
||||||
`"; filename="`+quoteEscaper.Replace(file.Name)+
|
i,
|
||||||
`"`)
|
quoteEscaper.Replace(file.Name),
|
||||||
|
))
|
||||||
contentType := file.ContentType
|
contentType := file.ContentType
|
||||||
if contentType == "" {
|
if contentType == "" {
|
||||||
contentType = "application/octet-stream"
|
contentType = "application/octet-stream"
|
||||||
|
|
Loading…
Reference in a new issue