title: TypeError: "setting getter-only property vuejs axios
body: <p>What am I trying to do: 
  Take an image as input. Convert it into a base64 string. Prepare payload containing the base64 string and hit the backend with that post request. Get the response data, preview the base64 image from the response object. </p>
  
  <p>When I run the code, I get following error inside axios request: </p>
  
  <blockquote>
    <p>TypeError: "setting getter-only property "result""</p>
  </blockquote>
  
  <p>FYI, <code>console.log(response)</code> prints successfully and I can see the response data. 
  However, <code>console.log('SUCCESSFUL')</code> doesn't print due to error</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id="Uploader"&gt;
      &lt;input type="file" id="file" ref="file" v-on:change="handleFileChanges" multiple/&gt;
      &lt;button v-on:click="upload_picture"&gt;Submit&lt;/button&gt;
      &lt;div&gt; Hello {{result}}&lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  
  import axios from 'axios';
  
  
  export default {
    name: 'Uploader',
  
    data() {
      return {
        file: '',
        values: '',
        result: [],
      };
    },
  
    methods: {
      handleFileUpload() {
        [this.file] = this.$refs.file.files;
      },
      handleFileChanges(e) {
        const reader = new window.FileReader(); // if window i
        // s not used it says File READER is not defined
        reader.onload = function oldyfunt(event) {
          // dispatch fileAttached to state UI postEditor with event.target.result as read dataURL
          this.values = event.target.result;
          console.log('VALUES');
          console.log(this.values);
          const data = {
            images: {
              image1: this.values.split(',')[1],
            },
          };
          axios.post('http://0.0.0.0:9094/analyze',
            data,
            {
              headers: {
                'Content-Type': 'application/json',
              },
            }).then((response) =&gt; {
            console.log(response);
            this.result = response.data;
            console.log('SUCCESS!!');
          }).catch((error) =&gt; {
            console.log(error);
            console.log('FAILURE!!');
          });
        };
        reader.readAsDataURL(e.target.files[0]);
      },
      upload_picture() {
        console.log(this.values);
      },
    },
  };
  &lt;/script&gt;
  
  </code></pre>