the picture is compressed with canvas and uploaded with formdata
$.ajax ({
) url:"/apis/rest/file/v2.0/image",
headers:{
"Authorization":_self.$router.access_token
},
type:"post",
dataType:"json",
contentType:false,
processData:false,
data:formdata,
}).done(function(data){
console.log(data)
})
The code is similar to the
picture size limit above. 2MB canvas.toDataURL compression is 0.5
iphone6. Safari uploading pictures will cause
readyState:0
status:0
but iPhoneX is fine
if you change the canvas.toDataURL compression to 0.1 iPhone6, you can upload it successfully
what is the reason?