|
本帖最后由 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错误
|
|