The problem of element checking before uploading pictures

   beforeAvatarUpload(file) {
        const isSize = new Promise(function (resolve, reject) {
            let _URL = window.URL || window.webkitURL;
            let img = new Image();
            img.src = _URL.createObjectURL(file);
            img.onload = function () {
                console.log(img.width, img.height)
                let valid = img.width / img.height === 16 / 9;
                valid ? resolve() : reject();
            };
        }).then(() => {
            return file;
        }, () => {
            this.$message.error("16:9");
            return false;
        });
        const is1M = file.size / 1024 / 1024 < 1;
        if (!is1M) {
            this.$message.error(" 1MB!");
        }
        return isSize && is1M;
    },
rejectfalse
Jan.25,2022
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-1bf396b-3a249.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-1bf396b-3a249.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?