processing an image upload form in django: when to use save() vs chunks() vs cleaned_data?
问题 I have successfully uploaded an image using the following code: views.py from django.conf.urls.defaults import * from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django import template from django.template import RequestContext from mysite.uploadr.forms import UploadFileForm def upload_file(request): if request.method == 'POST': form = UploadFileForm(request.POST, request.FILES) if form.is_valid(): form.handle_uploaded_file