Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
cannot save server response into vue data
<template>
  <div class="file-import">
    <file-pond
      name="files"
      credits=""
      label-idle="<span class='filepond--label-action'>file</span>"
      accepted-file-types="image/jpeg, image/png"
      :allow-multiple="true"
      server= "http://localhost:3000/upload"
      v-on:init="handleFilePondInit"
      >
    </file-pond>
    <button @click="printthis"> hi </button>

  </div>
</template>
<script>

setOptions({
  server: {
    url: 'http://localhost:3000/',
    process: {
      url: './upload',
      method: 'POST',
      withCredentials: false,
      timeout: 7000,
      onload: (response) => {
        //console.log(JSON.parse(response));
       
      },
      onerror: null
    },
  }
})

  data () {
    return {
      fileList: [],
    }
  },

I was trying to save response in setOptions into fileList. Yet, if I cannot find a way to do so. If I directly set fileList = response or fileList.push(response), the code does not recognize fileList in setOptions method. Is there a way to save response into fileList? Thank you in advance!

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!