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 <emily.kate.rodg...@googlemail.com> wrote: > On Aug 23, 11:31 pm, OnurCelebi <on.cel...@gmail.com> 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:<QueryDict: {u'uploadedfile': [u'C:\\Users\\Onur\\Desktop\ > > \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 -~----------~----~----~----~------~----~------~--~---