title: Upload file Vue 3 and Django REST
body: <p>I dont get if i work with request correctly, after upload all files is 1 KB and i cant open them. How to create correct file? If i save file as .doc i can see:</p>
  <pre><code> ------WebKitFormBoundaryt3UjlK5SVq8hgppA
  Content-Disposition: form-data; name=&quot;file&quot;
  
  [object FileList]
  ------WebKitFormBoundaryt3UjlK5SVq8hgppA--
  </code></pre>
  <p>So my functions to submit in js file:</p>
  <pre><code>async submitFiles() {
  
              let formData = new FormData();
              formData.append('file', this.file);
              console.log(this.file)
  
              axios.put(`/api/v1/myapp/upload/${this.file[0].name}`,
                  formData,
                  {
                      headers: {
                          'Content-Disposition': 'attachment',
                          'X-CSRFToken': await this.getCsrfToken(),
                      },
  
                  }
              ).then(function () {
                  console.log('SUCCESS!!');
              })
              .catch(function () {
                  console.log('FAILURE!!');
              });
  
          },
  </code></pre>
  <p>To handle change of file in form</p>
  <pre><code>        fileChanged(file) {
              this.file = file.target.files
          },
  </code></pre>
  <p>And finally my view.py</p>
  <pre><code>class FileUploadView(APIView):
      parser_classes = [FileUploadParser]
  
      def put(self, request, filename, format=None):
  
          file_obj = request.data['file']
  
          handle_uploaded_file(file_obj)
          return Response({'received data': request.data})
  </code></pre>
  <p>Where</p>
  <pre><code>def handle_uploaded_file(f):
      with open('path/to/my/folder/' + str(f.name), 'wb+') as destination:
          for chunk in f.chunks():
              destination.write(chunk)
  </code></pre>