LR,写了一个七牛云上传图片的脚本,但是调试不通过,求大神帮忙啊!有红包打赏
本帖最后由 fyy2016 于 2016-9-20 09:40 编辑七牛demo:http://jssdk.demo.qiniu.io/
token可以手动上传图片时获取一次,作为调试脚本使用。
Action()
{
web_url("jssdk.demo.qiniu.io",
"URL=http://jssdk.demo.qiniu.io/",
"Resource=0",
"RecContentType=textml",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot?", ENDITEM,
"Url=/uptoken", ENDITEM,
"Url=/images/loading.gif", ENDITEM,
"Url=http://7xocov.com2.z0.glb.qiniucdn.com/Koala.jpg?imageView2/1/w/100/h/100", ENDITEM,
"Url=http://7xocov.com2.z0.glb.qiniucdn.com/Koala.jpg?imageInfo", ENDITEM,
"Url=http://7xocov.com2.z0.glb.qiniucdn.com/Penguins.jpg?imageView2/1/w/100/h/100", ENDITEM,
"Url=http://7xocov.com2.z0.glb.qiniucdn.com/Penguins.jpg?imageInfo", ENDITEM,
LAST);
web_custom_request("upload.qiniu.com",
"URL=http://upload.qiniu.com/",
"Method=OPTIONS",
"Resource=0",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
web_submit_data("upload.qiniu.com_2",
"Action=http://upload.qiniu.com/",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=application/json",
"Referer=http://jssdk.demo.qiniu.io/",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=name", "Value=jjyjj.jpg", ENDITEM,
"Name=chunk", "Value=0", ENDITEM,
"Name=chunks", "Value=1", ENDITEM,
"Name=key", "Value=jjyjj.jpg", ENDITEM,
"Name=token", "Value=JOiPUijNB0t8vbNKIufpn5gDKmg0G-uFHBlrQoV2:dJgUJ-WHBWotfkkWyPqD2xPCm6Y=:eyJzY29wZSI6Impzc2RrIiwiZGVhZGxpbmUiOjE0NzQzMzg5OTR9", ENDITEM,
"Name=file", "Value=kkk.jpg","File=yes",ENDITEM,
LAST);
return 0;
}
token可以手动上传图片时获取一次,作为调试脚本使用。这里就没有参数化
一运行就报400错误
1.地址有错误;
"URL=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/d8e9f6392f6b42c9a02e45673da7a111/tydyecokvdyb.pnghttp://jssdk.demo.qiniu.io/",
2.取值错误;
"Value=JOiPUijNB0t8vbNKIufpn5gDKmg0G-uFHBlrQoV2:VI3yrEAxmR5Ad3UY2AeY5v9DRTQ=:eyJzY29wZSI6Impzc2RrIiwiZGVhZGxpbmUiOjE0NzI3MDI4MTR9", ENDITEM, 呵呵,谢谢啊。第一条是复制的问题。第二个是要参数化获取的,目前调试就手动获取了。今天早上来调试下,竟然自己通过了,不懂啊。:L
总之谢谢。不知道怎么赠送积分:dizzy:,等弄好了送你些积分哈
:):loveliness:
页:
[1]