This problem is more subtle than I had originally appreciated.  Textual data 
is just re-submitted via an embedded hidden form, and the security hash is 
used to ensure that it hasn't been modified.  File data is harder to cope 
with.  There are a few options:

1. The originally uploaded file is held in some temporary location during 
the preview stage and then moved to the final location on "submit".  This 
allows uploaded files to be part of the validation/preview processing 
chain.  The problem is that they must be removed if the final "submit" never 
happens.  It is also tricky figuring out how to put these files in some 
"temporary" location.

2. The original preview form does not include files.  These are only 
uploaded with the final "submit".  This should "just work", but the down 
side is that there is no easy way to validate things like file not uploaded 
(mandatory upload files) or that the file format/content is as expected.

3. The originally uploaded file is processed like all is well and assumes a 
"submit" will happen.  The final "submit" process then has to re-link the 
pre-uploaded file to the form object before saving it.

If there are other alternatives, I'd love to know what they are.  1. and 3. 
seem like the best plans.  I feel like I should move forward with 1.

Comments welcome.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to