PDA

View Full Version : doubt in file upload



crazy
14 Oct 2009, 10:12 PM
hi all........

plz check the link
http://www.extjs.com/deploy/dev/examples/form/file-upload.html




var fp = new Ext.FormPanel({
renderTo: 'fi-form',
fileUpload: true,
width: 500,
frame: true,
title: 'File Upload Form',
autoHeight: true,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 50,
defaults: {
anchor: '95%',
allowBlank: false,
msgTarget: 'side'
},
items: [{
xtype: 'textfield',
fieldLabel: 'Name'
},{
xtype: 'fileuploadfield',
id: 'form-file',
emptyText: 'Select an image',
fieldLabel: 'Photo',
name: 'photo-path',
buttonText: '',
buttonCfg: {
iconCls: 'upload-icon'
}
}],
buttons: [{
text: 'Save',
handler: function(){
if(fp.getForm().isValid()){
fp.getForm().submit({
url: 'file-upload.php',
waitMsg: 'Uploading your photo...',
success: function(fp, o){
msg('Success', 'Processed file "'+o.result.file+'" on the server');
}
});
}
}
},{
text: 'Reset',
handler: function(){
fp.getForm().reset();
}
}]
});


anyone plz say what is doing in 'file-upload.php'


i want to know how the uploaded file is saved to the server.....


thanks in advance.......
cRaZy

MaximGB
14 Oct 2009, 10:49 PM
http://php.net/manual/en/features.file-upload.php
http://www.php.net/manual/en/features.file-upload.post-method.php