[Answered ]-Using <input type="file"> in Django

2👍

The code you posted, as it is posted, works fine. The HTML is sound (though I think the enctype on the <input> is redundant at best), and a very simple view shows an InMemoryFile after the POST. The problem must lie in something between the browser and your view. Some things to check:

  • Middleware.
  • Apache.
  • Nginx.
  • Decorators on your view.
  • mod_wsgi configuration.

Leave a comment