use the interface for taking pictures or selecting pictures from mobile albums + the interface for uploading pictures. There is no problem with previewing when uploading multiple images, and you can all come out. But when uploading, the ios phone can only upload the last picture successfully, while the android phone has no problem, all can be uploaded successfully. Has anyone encountered this problem? The code is as follows:
wx.chooseImage({
success: function (res) {
var localId = res.localIds;
for (var i = 0; i < localId.length; iPP) {
str_pics += "<img src="" + localId[i] + "" id="" + localId[i] + ""/>";
wx.uploadImage({
localId: localId[i].toString(),
isShowProgressTips: 1,
success: function (res) {
$("-sharpimgs_area").append("<input name="media_ids[]" type="hidden" value="" + res.serverId + "">");
}
});
}
$("-sharpimgs_area").append(str_pics);
}
});
I have just tested the iPhone mobile phone photo upload and uploaded two pictures without any problem, but as long as you choose an album, you can only upload the last one all the time
.