|
|
调试输出 (上传 (对话框_打开文件 (取窗口句柄 (), , “图片文件”, “图片文件|*.jpg”, 真)) )| 变量名 | 类 型 | 静态 | 数组 | 备 注 | | 上传地址 | 文本型 | | | | 图片数据 | 字节集 | | | | 图片名称 | 文本型 | | | | 图片类型 | 文本型 | | | | boundary | 文本型 | | | | headers0 | 类_POST数据类 | | | | headersS | 文本型 | | | | post0 | 类_POST数据类_字节集 | | | | postB | 字节集 | | | | 结果 | 字节集 | | |
上传地址 = “https://xxx.com/api_new.php?action=update_avatar”图片数据 = 读入文件 (文件路径 )图片类型 = “image/jpeg”图片名称 = 文本_取随机字符 (取随机数 (1, 12 ), 位或 (1, 2, 4 )) + “.jpg”boundary = 取重复文本 (4, “-”) + “WebKitFormBoundary” + 文本_取随机字符 (16, 位或 (1, 2, 4 )) headers0. 置值 (“Content-Type”, “multipart/form-data; boundary=” + boundary )headers0. 置值 (“Referer”, “https://xxx.com/api_new.php”)headers0. 置值 (“Content-Length”, 到文本 (取字节集长度 (图片数据 )) )headers0. 置值 (“User-Agent”, “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36”)headersS = headers0. 获取协议头数据 ()post0. 添加 (“action”, 到字节集 (“update_avatar”), , )post0. 添加 (“email”, 到字节集 (“123123123@qq.com”), , )post0. 添加 (“token”, 到字节集 (“75dc885448c660e69f4effc00f36bca7baa761c1611971d37a0751e1dd5b87ee”), , )post0. 添加 (“device_id”, 到字节集 (“65JHFUKHUDCRQ7R7MXGSIZE9WOTVU9GZ”), , )post0. 添加 (“avatar_file”, 图片数据, 图片类型, 图片名称 )postB = post0. 获取Post数据 (boundary, )调试输出 (到文本 (postB )) 结果 = 网页_访问_对象 (上传地址, 1, , , , headersS, , , 真, postB, , , , , , , , , )返回 (编码_Utf8到Ansi (结果 ))
|
|