lekhang2512 / vue-upload-multiple-image

A simple upload multiple image component for Vuejs
132 stars 50 forks source link

How to access actual Image Object? #66

Open omiid-ad opened 3 years ago

omiid-ad commented 3 years ago

Hey, I'm using axiosto POSTmy uploaded images to an API which receives an array of images. but i do not know how to upload actual image file to api. i tried fileList[index].path but it only gives me the path of uploaded image which is not acceptable by api (i face with HTTP400error which says "expected image but got str")

habib-ch commented 2 years ago
uploadImageSuccess(formData, index, fileList) {
      console.log(formData.get("file"));
    },
skilljobs commented 1 year ago

How get files in vuje data objects so than another function can upload

uploadImageSuccess(formData, index, fileList) { this.images.push(formData)

     },