- Código: Seleccionar todo
{
xtype: 'form',
fileUpload: true,
frame: true,
id: 'formDigitalSign',
autoWidth: true,
height: 120,
items: [{
xtype: 'textfield',
fieldLabel: 'Llave',
inputType: 'file',
name: 'filekey'
},{
xtype: 'textfield',
fieldLabel: 'Contraseña',
inputType: 'password',
name: 'passkey'
}],
buttons: [{
xtype: 'button',
text: 'Ok',
handler: function(b,e){
var form = Ext.getCmp('formDigitalSign').getForm();
form.submit({
url: base_URL + 'cevaluacion/subirFile',
success: function(form,action){
alert('exito');
},
failure: function(f,a){
alert(a.response);
}
});
}
}]
}
mi objetivo es enviar un fichero hacia el servidor, mi primera duda es como llega el fichero al servidor, en JSON o en otra cosa y como lo recojo, por que no hay forma santa de recojerlo. mi codigo en php, usando codeigniter es el siguiente:
- Código: Seleccionar todo
$config = array();
$config['upload_path'] = './uploads/';
$config['max_size'] = '3042';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
$this->load->view('upload_form', $error);
}
else
{
$data = array('upload_data' => $this->upload->data());
$this->load->view('upload_success', $data);
}
ayudenme, lo necesito de veras.
saludos hermanos

