Yes you are right, I was not thinking about security. :)

Thanks

2011/10/20 Tom Evans <tevans...@googlemail.com>

> On Thu, Oct 20, 2011 at 10:49 AM, Leonardo Giordani
> <giordani.leona...@gmail.com> wrote:
> > No, I think I didn't correctly explain the matter; say I have a Thing
> model
> > with a list of strings in it.
> >
> > I want the user to be able to:
> >
> > 1. Access the Thing creation form
> > 2. While editing the form loading a file and being presented with the
> full
> > content
> > 3. Choosing some lines from that content
> > 4. Submit the form
> >
> > So I need to "modify" the view attaching fields which content comes from
> > what the user uploads.
>
> You cannot do that. You can upload the file in the background after
> the user has selected the file, using AJAX. Once the file has been
> uploaded the server could return the contents as a form control, and
> allow the user to select the parts of it they wish. Gmail partially
> does this - once you have selected a file to attach, it uses AJAX to
> upload it in the background whilst you type your email.
>
> Fortunately, there is no way for a web developer to instruct a browser
> to open a file from disk and insert its contents into form controls.
> If you think about it, you will understand why.
>
> Cheers
>
> Tom
>
> --
> 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.
>
>

-- 
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