CameraRoll.getPhotos(fetchParams) .then((data) => this._appendImages(data), (e) => console.log(e));
当我使用 FormData
const images = messages.map(k => {
return {
uri: k.image, //`file:///${k.image}`,
name: k.filename,
type: mime.lookup(k.filename),
}
})
console.log(images)
postData = new FormData();
postData.append('file', images);
postData.append('userid', this.user._id);
postData.append('time', moment().format('YYYY-M-D H:mm:ss'));
postData.append('group', this.groupID);
axios.post(WebAPI.url.chat.postImage,
postData,
{
headers: {
access_token: this.user.access_token,
'Content-Type': 'multipart/form-data',
},
}
).then(response => {
console.log(response.data)
}).catch(error => {
console.log(error)
})
C#可以获取Request.Form,但是不能获取Request.Files
谁能帮我 ?太感谢了 !