title: 'InMemoryUploadedFile' object has no attribute 'get'
body: <p>I'm having trouble getting images to upload to an S3 bucket from Django </p>
  
  <p>The error I'm getting is:</p>
  
  <blockquote>
    <p>'InMemoryUploadedFile' object has no attribute 'get'</p>
  </blockquote>
  
  <p>I've looked at similar questions, but haven't found a solution from them (or others not listed below):</p>
  
  <p><a href="https://stackoverflow.com/questions/33445812/modelform-has-no-attribute-get">ModelForm has no attribute get</a></p>
  
  <p><a href="https://stackoverflow.com/questions/7241743/django-image-uploading?rq=1">Django image uploading</a></p>
  
  <p><a href="https://stackoverflow.com/questions/28336247/django-user-object-has-no-attribute-get-error">django &#39;User&#39; object has no attribute &#39;get&#39; error</a></p>
  
  <p>Here's my code:</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from django import forms
  from .models import UploadImage, UploadAudio
  
  class ImageForm(forms.ModelForm):
  class Meta:
      model = UploadImage
      fields = ['myimage']
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.contrib import messages
  from django.shortcuts import render, get_object_or_404, redirect
  from django.http import HttpResponse, HttpResponseRedirect
  from django.shortcuts import redirect
  from .forms import ImageForm, AudioForm
  from .models import UploadImage
  
  
  def ImageCreate(request):
      if request.method == 'POST':
          form = ImageForm(request.POST, request.FILES['myimage'])
          if form.is_valid():
              image = form.save(commit=False)
              image.author = request.user
              image.save()
              messages.success(request, "Uploaded successfully")
              return redirect('mytimer')
          else:
              messages.error(request, "Unable to upload at this time")
  else:
      form = ImageForm()
  return render(request, "myimages.html", {'form': form})
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from __future__ import unicode_literals
  
  from django.db import models
  from django.conf import settings
  
  
  class UploadImage(models.Model):
      """
      Define how the user will upload images
      """
      # link author to registered user
      author = models.ForeignKey(settings.AUTH_USER_MODEL)
      myimage = models.ImageField(upload_to='myimages/')
      uploaded_at = models.DateTimeField(auto_now_add=True)
  </code></pre>
  
  <p>Thank you so much in advance for any help.</p>
  
  <p><strong>traceback</strong></p>
  
  <pre><code>Environment:
  
  
  Request Method: POST
  Request URL: http://127.0.0.1:8000/myimages/
  
  Django Version: 1.11.6
  Python Version: 2.7.12
  Installed Applications:
  ['django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'hello',
  'timer',
  'accounts',
  'django_forms_bootstrap',
  'diary',
  'storages',
  'useruploads',
  'debug_toolbar']
  Installed Middleware:
  ['django.middleware.security.SecurityMiddleware',
  'debug_toolbar.middleware.DebugToolbarMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.clickjacking.XFrameOptionsMiddleware']
  
  
  
  Traceback:
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/core/handlers/base.py" in _get_response
  187.                 response = 
  self.process_exception_by_middleware(e, 
  request)
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, 
  *callback_args, **callback_kwargs)
  
  File "/home/pauly/Documents/MeditationTimer/Meditate_prj/
  useruploads/views.py" in ImageCreate
  15.         if form.is_valid():
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/forms/forms.py" in is_valid
  183.         return self.is_bound and not self.errors
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/forms/forms.py" in errors
  175.             self.full_clean()
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/forms/forms.py" in full_clean
  384.         self._clean_fields()
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/forms/forms.py" in _clean_fields
  396.                 value = 
  field.widget.value_from_datadict(self.data, self.files, 
  self.add_prefix(name))
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/forms/widgets.py" in value_from_datadict
  423.         upload = super(ClearableFileInput, 
  self).value_from_datadict(data, files, name)
  
  File 
  "/home/pauly/Documents/MeditationTimer/env/local/lib/python2.7/site-
  packages/django/forms/widgets.py" in value_from_datadict
  367.         return files.get(name)
  
  Exception Type: AttributeError at /myimages/
  Exception Value: 'InMemoryUploadedFile' object has no attribute 'get'
  </code></pre>