The image uploaded by formdata reported an error when the image size was too large on iphone6.

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?

Apr.06,2022

the reason is that the memory explodes due to the large picture.
it is recommended not to compress too many pictures at a time. Limit the width and height
I am using a third-party tool lrz compressed

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3fc95-2c4b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3fc95-2c4b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?