On Fri, Mar 15, 2013 at 12:59 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Thu, Mar 14, 2013 at 5:08 PM, Shawn Milochik <sh...@milochik.com> wrote: >> On Thu, Mar 14, 2013 at 6:03 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >>> >>> I have been googing this for 2 days and trying lots of different >>> things, without success. I really appreciate your help - I've made >>> more progress in the last hour then in the previous 48. >> >> >> Glad I could help, but you really should search the Django docs and >> Google first. This is definitely one you would have found in the >> Django docs. >> >> https://docs.djangoproject.com/en/1.5/topics/http/file-uploads/ > > Thanks. I've found some examples, but they all use an upload button in > addition to the 'choose file' button. Is there some way to have it > upload the files as soon as the user click on open in the file picker? >
To be honest, I'm not sure. You could set an onchange event to automatically submit the form as soon as that control changes, but I'm fairly certain that <input type="file"> should not throw any change events or make the name of the file available to JS, for reasons of security. Auto submitting the form would not allow the user to correct mistakenly selecting the wrong file, or rather, forms usually allow you to change a field and verify before submitting, so automatically submitting would violate POLA, and I could see browsers potentially disallowing that. You would need to test - can you auto-submit the form on change of the file field? Try it and let us know. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.