From f459480089d18ba8ca3ea6d5aaf9f6ad06f6e1dd Mon Sep 17 00:00:00 2001 From: Heipi Date: Tue, 19 Sep 2023 10:31:50 +0800 Subject: [PATCH] Update UploadQRcode.pm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复二维码上传失败问题(更新图床上传URL)。 --- lib/Mojo/Weixin/Plugin/UploadQRcode.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Mojo/Weixin/Plugin/UploadQRcode.pm b/lib/Mojo/Weixin/Plugin/UploadQRcode.pm index 5642f71..cac2564 100644 --- a/lib/Mojo/Weixin/Plugin/UploadQRcode.pm +++ b/lib/Mojo/Weixin/Plugin/UploadQRcode.pm @@ -7,7 +7,8 @@ sub call{ $client->on(input_qrcode=>sub{ my($client,$qrcode_path,$qrcode_data) = @_; #需要产生随机的云存储路径,防止好像干扰 - my $json = $client->http_post('https://sm.ms/api/upload',{json=>1},form=>{ + #更新图床上传地址 2023-09-19 by heipidage + my $json = $client->http_post('https://sm.ms/api/v2/upload',{json=>1},form=>{ format=>'json', smfile=>{filename=>$qrcode_path,content=>$qrcode_data}, });