mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-14 17:52:27 +08:00
Compare commits
2 Commits
f2dedebcd7
...
b3b90e56cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3b90e56cc | ||
|
|
26a6d7dc1d |
@@ -3,6 +3,7 @@ package material
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/silenceper/wechat/v2/util"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,13 +8,14 @@ import (
|
||||
"encoding/pem"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"golang.org/x/crypto/pkcs12"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"golang.org/x/crypto/pkcs12"
|
||||
)
|
||||
|
||||
// URIModifier URI修改器
|
||||
|
||||
@@ -2,6 +2,7 @@ package material
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/silenceper/wechat/v2/util"
|
||||
)
|
||||
|
||||
@@ -55,11 +56,11 @@ func (r *Client) UploadImg(filename string) (*UploadImgResponse, error) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
// UploadTempFile 上传临时素材
|
||||
// UploadRemoteTempFile 上传临时素材
|
||||
// @see https://developer.work.weixin.qq.com/document/path/90253
|
||||
// @mediaType 媒体文件类型,分别有图片(image)、语音(voice)、视频(video),普通文件(file)
|
||||
// 临时素材一般都是存储在oss上的,可以直接传递url
|
||||
func (r *Client) UploadTempFile(url string, mediaType string) (*UploadTempFileResponse, error) {
|
||||
func (r *Client) UploadRemoteTempFile(url string, mediaType string) (*UploadTempFileResponse, error) {
|
||||
var (
|
||||
accessToken string
|
||||
err error
|
||||
|
||||
Reference in New Issue
Block a user