PDA

View Full Version : UploadFile and [tmp_name] incomplete



ssamuel68
11 Jan 2012, 10:57 AM
Hi, im using extjs4 and im having a problem with the fileUpload, i cant receive the complete path of the [tmp_name]

Here is my code:
View:


this.tbar = Ext.create('Ext.toolbar.Toolbar', { items: [{
xtype: 'form',
border:false,
fileUpload:true,
isUpload: true,
enctype:'multipart/form-data',
headers: {'Content-type':'multipart/form-data'},
method: 'POST',
bodyStyle: {
background: 'transparent'
},
items:[
{
xtype: 'fileuploadfield',
name: 'ufile',
buttonText: 'New',
buttonOnly: true,
buttonConfig: {
icon: 'resources/img/icons/add.png'
}
},
]
}
]
});

Then i use form.submit

PHP Code:


print_r($_FILES['ufile']);


But $_FILES['ufile']['tmp_name'] is incomplete

Output $_FILES['ufile']:



(
[name] => arnie.wav
[type] => audio/wav
[tmp_name] => /tmp/phpfbjS5r
[error] => 0
[size] => 21428
)

So where is the rest of the file on my tmp: /tmp/phpfbjS5r

And that folder isnt on my tmp folder

Thx

mitchellsimoens
11 Jan 2012, 1:48 PM
Are you sure that temp file isn't created by PHP? If it really isn't then it sounds like your PHP install isn't configured correctly.

ssamuel68
29 Jan 2012, 5:21 PM
It was my bad, on linux the extension of the
$_FILES['ufile']['tmp_name']
is different than Windows, my problem was folder permissions.


Thx anyway :)