Okay, so my server side file upload code works with a classic form tag and a input tag with type "file". But Ext 4.0 seems to have a problem. Any suggestions / help will be greatly appreciated!
HTML Code that works fine:
PHP Code:
<html>
<body>
<form enctype="multipart/form-data" action="/newsearch/upload" method="POST">
Please choose a file: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>
</body>
</html>
Ext 4.0 code that doesnt run well:
PHP Code:
this.fileUploadField = Ext.create('Ext.form.field.File', {
id:'file',
name:'file',
labelWidth : 105,
width : 550,
fieldLabel : 'Select a file'
});
this.fileUploadForm = Ext.create('Ext.form.Panel', {
border : false,
url:'/newsearch/upload',
height:250,
items : [this.fileUploadField]
});
which is inside a view. Im calling the submit() function on fileUploadForm on click of another button. What exactly am I doing wrong? Im using Ext 4.0 MVC for this.