Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda