Failed to upload ios11,formdata images?

vue for the framework.

it needs to be compressed before uploading. The canva is used to compress before uploading, but the ios11 image cannot be uploaded. After that, I found a plug-in, localResizeIMG.

think2011/localResizeIMG

the results are normal on Android as well as ios9 and 10 tests. Pictures still cannot be uploaded under ios11. You can print out the base64, and the converted blob.

the base64, used to display pictures in the foreground is transmitted to the background by blob.

at first thought it was the reason for the ios11 image format HEIC, then tested it with a png image format. Still not.

what is displayed at the front desk of rst.base64 can be displayed normally.

rst.file, is sent to the background and can be printed in blob format

lrz(file[i])
.then(function(rst) {
// 
var img = new Image();
img.src = rst.base64;
console.log(rst.base64)
img.onload = function() {
    vm.images.push(rst.base64);
        vm.fourimages.push(rst.file)
}
console.log(rst.formData)
console.log(rst.file)
if(vm.images.length > 6) {
    vm.images.length = 6;
    vm.$dialog.toast({            
        mes: "6",            
                timeout: 1500,
        icon: "error",
    });
}
})
.catch(functerr) {
// 
})
.always(function() {
// 
});
let formData = new FormData()
for(var l = 0; l < this.$store.state.images.length; lPP) {
    formData.append("images[]", this.$store.state.images[l], "img" + [l] + ".jpeg");
}
let config = {
     headers: {
    "Content-Type": "multipart/form-data"
    }
}
this.$http.post(url, formData, config).then(function(res) {
    if(res.status === 200) {
        this.$dialog.loading.close();
        this.$dialog.toast({
            mes: res.body.info,
            timeout: 1500,
            icon: "success"
        });
        this.$router.push({
            path: "/"
        })
    }
})
Mar.02,2021

. I also encountered this problem, ios11 has this problem, how do you solve it?


has the landlord solved it? ask


Hello. I have the same problem now, that is, I use the axios+formData, ios11 system to upload pictures and send them to the backend. The size of the picture is 0, and any other system can. Could you tell me how to solve it? This problem has been bothering me all day.

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-1e49241-432bf.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-1e49241-432bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?