Re: request.FILES empty... only with IE!
Ok thanks. I did it as a trick: i create the form hardcoded in html that I do not display thanks to css, I copy it to another place when I need it with newDiv.innerHTML = staticDiv.innerHTML, and I browse htmlDom elements of the copy to add dynamic properties. It all works fine. THanks again. On Aug 24, 1:11 pm, James Bennett wrote: > On Mon, Aug 24, 2009 at 5:07 AM, OnCEL wrote: > > This is a form created dynamically in JS and it contains only a file > > input and a submit button (also created dynamically). > > The entire form creating code is: > > I would wonder whether security restrictions in the browser are > causing this; I know that manipulating file inputs is off-limits in > most browsers, and it may be that IE is also interfering with the > ability to dynamically create them. > > -- > "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: request.FILES empty... only with IE!
On Mon, Aug 24, 2009 at 5:07 AM, OnCEL wrote: > This is a form created dynamically in JS and it contains only a file > input and a submit button (also created dynamically). > The entire form creating code is: I would wonder whether security restrictions in the browser are causing this; I know that manipulating file inputs is off-limits in most browsers, and it may be that IE is also interfering with the ability to dynamically create them. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: request.FILES empty... only with IE!
Hi Emily, This is a form created dynamically in JS and it contains only a file input and a submit button (also created dynamically). The entire form creating code is: var upform = document.createElement('form'); upform.setAttribute('action','/engine/users/avatar/'); upform.setAttribute('enctype','multipart/form-data'); upform.setAttribute('method','post'); upform.setAttribute('target','hiddeniframe'); // Even without this line, I have the same strange behaviour var inp1 = document.createElement('input'); inp1.setAttribute('type','file'); inp1.setAttribute('id','file1'); inp1.setAttribute('name','uploadedfile'); var inp2 = document.createElement('input'); inp2.setAttribute('type','submit'); inp2.setAttribute('id','btn1'); inp2.className = 'form_button_normal'; inp2.innerHTML = 'Upload'; upform.appendChild(inp1); upform.appendChild(inp2); What I do, is selecting a file by browsing and then click on "Upload". On Aug 24, 11:39 am, Emily Rodgers wrote: > On Aug 23, 11:31 pm, OnurCelebi wrote: > > > > > > > Hi all, > > I have a very strange behaviour. I have an upload form like this: > > > var upform = document.createElement('form'); > > upform.setAttribute('action','/engine/users/avatar/'); > > upform.setAttribute('enctype','multipart/form-data'); > > upform.setAttribute('method','post'); > > > created dynamically with JS. > > With Chrome and Firefox, it works fine. But with IE, I obtain an empty > > request.FILES, it seems that the filename and its location (on clients > > machine! ) goes to request.POST: > > > POST: > \toto07_61.jpg']}>, > > > Is this a bug? > > Is there a way to fetch the file through POST's dictionary? > > Hi, > > I don't think you have given us enough information to figure out what > is happening. How are you creating and populating the form fields and > what are they? > > Em --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: request.FILES empty... only with IE!
On Aug 23, 11:31 pm, OnurCelebi wrote: > Hi all, > I have a very strange behaviour. I have an upload form like this: > > var upform = document.createElement('form'); > upform.setAttribute('action','/engine/users/avatar/'); > upform.setAttribute('enctype','multipart/form-data'); > upform.setAttribute('method','post'); > > created dynamically with JS. > With Chrome and Firefox, it works fine. But with IE, I obtain an empty > request.FILES, it seems that the filename and its location (on clients > machine! ) goes to request.POST: > > POST: \toto07_61.jpg']}>, > > Is this a bug? > Is there a way to fetch the file through POST's dictionary? Hi, I don't think you have given us enough information to figure out what is happening. How are you creating and populating the form fields and what are they? Em --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
request.FILES empty... only with IE!
Hi all, I have a very strange behaviour. I have an upload form like this: var upform = document.createElement('form'); upform.setAttribute('action','/engine/users/avatar/'); upform.setAttribute('enctype','multipart/form-data'); upform.setAttribute('method','post'); created dynamically with JS. With Chrome and Firefox, it works fine. But with IE, I obtain an empty request.FILES, it seems that the filename and its location (on clients machine! ) goes to request.POST: POST:, Is this a bug? Is there a way to fetch the file through POST's dictionary? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---