Results 1 to 3 of 3

Thread: UploadFile and [tmp_name] incomplete

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    85

    Question UploadFile and [tmp_name] incomplete

    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:
    Code:
    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:
    PHP Code:
    print_r($_FILES['ufile']); 
    But $_FILES['ufile']['tmp_name'] is incomplete

    Output $_FILES['ufile']:

    HTML Code:
    ( 
       [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

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    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.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    85

    Thumbs up

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •