[Vuejs]-Vue send base64 with axios, but is null

0👍

reader.readAsDataURL(anexo); is asynchronous. The forEach looping is synchronous. The axios.post is happening before data is actually loaded.
One solution is to use a promise wrapper and for of iterator to wait

Something like https://codesandbox.io/embed/cranky-cherry-oxvhg

Leave a comment