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]'字段 –