0 Replies Latest reply on Jun 11, 2006 11:20 AM by Jase_93tt

    Flash 8 File Upload using CFMX 7

    Jase_93tt
      Hello all,

      I am experiencing problems when attempting to upload .jpg files using flash 8 and coldfusion 7 on Macintosh.

      Basically, Ive created a log-in system using session variables. A copy of the cfapplication which handles the log-in system and resides in the application.cfm file is below:-

      <CFAPPLICATION
      name = "login"
      sessionManagement = "Yes"
      SetClientCookies = "Yes"
      clientmanagement = "Yes"
      sessionTimeOut = "#CreateTimeSpan(2,0,0,0)#">

      A user logs-in and is then able to access the upload image page which contains a flash 8 swf file. The user browses to the file(s) they wish to upload and presses submit to start the upload process. A progress bar displays on screen showing current progress. Upon completion of the upload, the files are saved to a unique folder for that user, on the server. The folders that the uploads are saved to is taken from a session variable value, 'session.login.eventid'. A typical folder name can simply be 'FOLDER001'.

      Now, all this works fine on any PC. The files are chosen, uploaded and saved to the correct folder.

      But, on the mac, for some reason, the progress bar appears to be uploading the files, but they are not saved on the server, and sometimes I get an HTTP 500 error.

      Here is the script that communicates with the flash file to upload the images:

      <cfscript>
      eventID = session.login.eventid;
      </cfscript>

      <cffile action="upload" fileField="Filedata" destination="#uploadPath##eventID# nameConflict="makeunique" />

      The variable #uploadPath# is set in the application.cfm file and its value is c:\websites\uploads\

      So my problem is getting the mac to save the files.

      During vigorous testing, Ive found a way to get the mac to save the files by hardcoding the folders name instead of getting the value from #session.login.eventid#

      ie.

      <cfscript>
      eventID = "FOLDER001";
      </cfscript>

      <cffile action="upload" fileField="Filedata" destination="#uploadPath##eventID# nameConflict="makeunique" />

      The above works fine. So how come the mac wont use the session variable value ? When tested on Windows PC's, everything works fine.

      Is it the way Macs uses session variables perhaps ? But then Im setting many other values within the same session and they working fine throughout the site, both mac and pc.

      It cant be the upload folders chmod values as the hardcoded folder name version uploads fine.

      Any help much appreciated as Ive been tearing my hair out over this.

      Cheers
      Jase