0 Replies Latest reply on Nov 21, 2011 11:58 PM by mixersoft3

    FileReference.upload() loses my PHP Session

    mixersoft3

      I'm having problems connecting to my PHP Session when uploading files with FileReference.upload()

       

      I can do simple POSTs from javascript in my app and the PHP Session Id is correctly passed using Cookies. But when I do a FileReference.upload() to the same URL I get uneven results.  Sometimes I can connect to the PHP Session on the first upload, but the Session ID changes for subsequent uploads and I no longer have access to the Authenticated User.id.

       

      I tried to pass 'CAKEPHP' (PHP session key) as the first POST param, but FileReference.upload() always outputs 'Filename' before anything in URLRequest.data.

       

      I'm including the $_POST from my server side log file below. Any ideas?

       

      output for $_POST from  FileReference.upload() with URLRequest.manageCookies=true.

       

      2011-11-22 07:51:25 Debug: Array (     [Filename] => bp~P1030540.JPG

          [CAKEPHP] => 097h60ccsj6tmaf1mkda6aa041     [data] => Array         (             [ProviderAccount] => Array                 (                     [provider_version] => v1.0                     [provider_key] => 653E5CAA-1B14-41B6-9447-756ED5CD97C2                     [id] => 653E5CAA-1B14-41B6-9447-756ED5CD97C2                     [provider_name] => desktop                 )             [groupIds] => 4cb28a45-2be0-41a0-b678-0ed8f67883f5             [Asset] => Array                 (                     [id] => CB9D39BE-C52E-4946-BD51-FB3F8C457842                     [height] => 2672                     [width] => 4000                 )             [isAIR] => 1             [User] => Array                 (                     [id] => 4ec86e34-8f04-4542-8e41-0cb8f67883f5                 )         )     [Upload] => Submit Query )