变量名 | 类 型 | 静态 | 数组 | 备 注 |
Param | 上传参数Bin | | |
success | 逻辑型 | | |
http | WinHttpW | | |
boundary | 文本型 | | |
response | 文本型 | | |
url | 文本型 | | |
file | 文本型 | | |
url =
“https://www.xxx.com”file =
“D:\xxx.png”Param.
Add (“media”,
读入文件 (file
),
“image/*”,
“test.png”)http.
Rest ()http.
Auto (真)boundary =
取重复文本 (10,
“-”) +
文本_取随机字符数字串 (16
)success = http.
Open ( #POST, url
) success =
选择 (success, http.
SetContentType (“multipart/form-data; boundary=” + boundary
),
假)success =
选择 (success, http.
SendBin (Param.
ToQuery (boundary, 10
)),
假)如果真 (success
)response = http.
GetResponseTextU2A ()返回 (真)返回 (假)