How to send a post request after el-upload uploads a picture in elementUi

upload pictures with el-upload in elementUi, and then send the picture data and form data together to the post request to the backend. The form data can be obtained by the backend, but the image data has not been available. What is the reason?

<div class="item-pic-bg">
    <img class="bgImg" :src="src" alt="">
        <el-upload
            class="upload"
            accept="image/*"
            :show-file-list="false"
            action="/upload/uploadFile"
            :on-success="handleSuccess">
        <el-button type="primary" @click="refeshLoad()" class="refesh btnNoBorder button b2">
        <i class="iconfont icon-shangchuan"></i> 
        </el-button>
        </el-upload>
</div>
//
            handleSuccess: function (response, file, fileList) {
                this.src = file.url;
                this.formData.files.push(file.raw);
            },
            
               //
            saveIt: function () {
                let formData = new FormData();
                formData.append("files", this.formData.files);
                //post         
                saveSlideShow(formData).then((res) => {
                })
            },
Mar.02,2021

this article can solve the problem: Link description


paste the general code to help you check

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