1

I am trying to pass from an input multiply images to the api as the following:

<el-form-item label="images" prop="images">
  <el-input name="files" type="file" multiple="multiple" v-model="property.images" v-on:input="changed"/>
</el-form-item>

and then passing to the data as:

  data() {
    return {
      property: { title: '', description: '', price: 0, images []},

then passing to api:

  createProperty() {
      WebAppAPI.CreateProperty(this.property).then(response => {

but is only passing one string url, even though I add several images.

Any idea what else do I need to do to pass an array instead of a string?

1

1 Answer 1

1

You can refer to this demo fidddle.

https://jsfiddle.net/RiddhiParekh/s8ot36kh/

 <el-upload multiple="multiple" class="upload-demo" action="https://jsonplaceholder.typicode.com/posts/" :on-change="handleChange" :file-list="fileList3">
  <el-button size="small" type="primary">Click to upload</el-button>
  <div slot="tip" class="el-upload__tip">jpg/png files with a size less than 500kb</div>
</el-upload>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.