-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
苹果端偶尔上传不了。怎么回事?安卓端一直没问题 #63
Comments
报错是什么? |
奇就是奇在没报错,但就是没上传到七牛。安卓是一直上传没问题,苹果端就偶尔上传不到七牛。 initQiniu();
var filePath = imgsrc[0];
var img_info = "";
if (filePath != null) {
var fileName = filePath.split('//')[1];
img_info = 'http://image.111111.com/' + fileName;
// 交给七牛上传
qiniuUploader.upload(filePath, (res) => {
this.data.infoimg = img_info;
this.data.place = place;
console.log("上传封面成功");
//提交至服务端
wx.request({
url: "http://localhost/api.php?do=post_child&openid=" + getApp().data.openid,
method: "POST",
header: { "content-type": "application/x-www-form-urlencoded" },
data: this.data,
complete: function (res) {
that.setData({
hidden: true
})
wx.showModal({
title: '恭喜',
content: '已提交成功!',
showCancel: false,
complete: function (res) {
wx.navigateTo({
url: '../index/index',
})
}
})
}
});
}, (error) => {
console.log("上传封面失败");
sendpic = 1;
});
} |
还是说苹果拍出的照片比较质量大,所以超过多少M上传不了?但安卓好像拍出来质量更大哦~ |
进行到哪一步卡住了呢?无论因为图片还是因为什么原因,都在 console 有错误提示,如果是卡在七牛上传,那就把返回的信息 log 出来。 |
error: "bad token"。。额,就苹果偶尔会这样,安卓不会有 |
bad token 就是 token 不对呀。
js 对于安卓还是 iOS 应该没有什么明显的区别,
关注一下 token 过期时间之类的?
发自我的 iPhone
… 在 2019年5月11日,23:25,zonas1991 ***@***.***> 写道:
error: "bad token"。。额,就苹果偶尔会这样,安卓不会有
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
苹果端偶尔上传不了。怎么回事?安卓端一直没问题
The text was updated successfully, but these errors were encountered: