Aldino Kemal
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
src/domains/send/file.go
-
src/services/send.go
|
|
|
@ -3,8 +3,9 @@ package send |
|
|
|
import "mime/multipart" |
|
|
|
|
|
|
|
type FileRequest struct { |
|
|
|
Phone string `json:"phone" form:"phone"` |
|
|
|
File *multipart.FileHeader `json:"file" form:"file"` |
|
|
|
Phone string `json:"phone" form:"phone"` |
|
|
|
File *multipart.FileHeader `json:"file" form:"file"` |
|
|
|
Caption string `json:"caption" form:"caption"` |
|
|
|
} |
|
|
|
|
|
|
|
type FileResponse struct { |
|
|
|
|
|
|
|
@ -189,6 +189,7 @@ func (service serviceSend) SendFile(ctx context.Context, request domainSend.File |
|
|
|
FileName: proto.String(request.File.Filename), |
|
|
|
FileEncSha256: uploadedFile.FileEncSHA256, |
|
|
|
DirectPath: proto.String(uploadedFile.DirectPath), |
|
|
|
Caption: proto.String(request.Caption), |
|
|
|
}} |
|
|
|
ts, err := service.WaCli.SendMessage(ctx, dataWaRecipient, msgId, msg) |
|
|
|
go func() { |
|
|
|
|