title: Django - Why does Django set `request.data` to QueryDict class when a file is attached, but a dict when no file is attached?
body: <p>So I have a test where I don't attach a file to the request</p>
  <pre><code>&gt;&gt;&gt;request.data
  {'description': 'Some Goal text', 'end_date': '2021-12-04', 'goal_category': 'health', 'body': 'Some text #blah\r#weeeee\x0c#foo', 'creator': '6badb4b8-33ba-4bb9-aa9a-2e3afb359960', 'type': &lt;PostType.DECLARE: 'DE'&gt;}
  &gt;&gt;&gt;type(request.data)
  &lt;class 'dict'&gt;
  </code></pre>
  <p><code>&gt;&gt;&gt;</code> denotes where I input into the debug console and below it is what is printed out. Then I attach a file and send in the request and I get this.</p>
  <pre><code>&gt;&gt;&gt;type(request.data)
  &lt;class 'django.http.request.QueryDict'&gt;
  &gt;&gt;&gt;request.data
  &lt;QueryDict: {'join_goal': ['d2f5aa8d-4cd0-4051-9d1a-35b28af276d5'], 'body': ['Some text and an image'], 'images': [&lt;InMemoryUploadedFile: test.jpg (text/plain)&gt;], 'creator': ['6badb4b8-33ba-4bb9-aa9a-2e3afb359960'], 'type': [&lt;PostType.UPDATE: 'UP'&gt;]}&gt;
  </code></pre>
  <p>Why does Django use a QueryDict when an image comes in?</p>
  <p><strong>Requested added code</strong></p>
  <pre><code>def set_request_data_for_post(request):
      request.data['creator'] = str(request.user.uuid)
      body_text = request.data['body']
      hash_tags = create_hashtags_uuid_list(body_text)
  
      if len(hash_tags) &gt; 0:
          request.data.setlist('hash_tags', hash_tags)
  
      tagged_users_list = extract_usernames(body_text)
  
      tagged_users = list()
      for username in tagged_users_list:
          try:
              tagged_users.append(str(User.objects.get(username=username).uuid))
          except User.DoesNotExist:
              pass
  
      if len(tagged_users) &gt; 0:
          request.data.setlist('tagged_users', tagged_users)
  
      return request
  </code></pre>
  <p>This new <code>request</code> var gets passed to a serializer.</p>