0
我正在删除iPhone上的应用程序。 我的合伙人向我发送curl命令这样无法上传图片
curl -F "clothing_item[photo][email protected]" -F "clothing_item[name]= pink_dress" http://www......com/shop_items.json?auth_token=abc_xyz_123
,并问我要实现哪些应对的图像上传到服务器的功能。 我试过
forge.ajax({
url: "http://www........com/shop_items.json",
type: "POST",
dataType: 'json',
data: {
"auth_token": token,
"clothing_item[photo]": imageFile,
"clothing_item[name]": id + "-" + d.getTime().toString()
},
success: function(data) {
},
error: function(error) {
}
});
使用imageFile是来自相机的文件。这篇文章是成功的,但没有图像上传到服务器。
相关搜索:
forge.ajax({
url: "http://www........com/shop_items.json",
type: "POST",
dataType: 'json',
file:[imageFile];
data: {
"auth_token": token,
"clothing_item[photo]": imageFile,
"clothing_item[name]": id + "-" + d.getTime().toString()
},
success: function(data) {
},
error: function(error) {
}
});
,但它不工作。
任何意见表示赞赏
谢谢阿隆。我会要求我的朋友删除'clothing_item [photo]'字段 –