Vue Js + vueformulate + Wp Api Rest + Gravity Forms plugin

236 Views Asked by At

I am learning VueJS and trying to use WP API Rest + VueJS + VueFormulate to create a form.

My idea is that the user can upload a PDF file to the wordpress site.

I have this Wordpress REST API> http://wptest.local/wp-json/wp/v2/media then I use Axios to upload the file to wordpress but when I click the upload button I am getting this error after the file is uploaded.

vue.runtime.esm.js: 1887 TypeError: Converting circular structure to JSON
     -> starting at object with constructor 'y'
     | property 'context' -> object with constructor 'Object'
     --- property 'model' closes the circle
     at JSON.stringify (<anonymous>)

Here is my code: https://codepen.io/dmezaromero/pen/jOVJzGQ

Any advice?

0

There are 0 best solutions below