1 Reply Latest reply on Apr 15, 2007 9:38 PM by wearHD.com

    File Upload from Macintosh

    wearHD.com
      Hi Everyone,

      I'm stuck. I have a Flash application that allows users to upload image files to the server. It has been working fine for everyone involved until I had my testers access the application from a secure location (https://mysite.secure.myserver.com/...). Now, when the fileRef.upLoad() method is called, it works fine for anyone running from a PC, but fails with an HTTP 404 Error for anyone running a Mac (using either Safari or FireFox as the browser).

      The URL for the upload is structured as "https://mysite.secure.myserver.com/...", which is what my server tells me I have to use to get an SSL connection. I have also tried "https://mysite.secure.myserver.com:443/...", and also the relative URL to my php script (fileRef.upLoad("myScript.php")), both to no avail. They both work for PC users but neither works for Mac users.

      I really don't know how to fix this and would greatly appreciate any help from anyone who has encountered this issue.

      Thank you,

      Andy
        • 1. Re: File Upload from Macintosh
          wearHD.com Level 1
          Ok, so to clarify the problem more...

          I have found the following "fixes" and implemented them, still receiving the HTTP 404 Error message:

          -- The URL of the php script is now not listed as a subdomain (which has given others that problem).
          -- The URL of the php script is now not a secure (https) URL.

          The URL that I was using was in the format "https://mydomain.secure.myhost.com/RestOfURL/myScript.php", since my Flash application was being accessed from that secure location also ("https://mydomain.secure.myhost.com/RestOfURL/mySWF.html"). Using an xml crossdomain policy file, I have allowed my Flash app (still being access from it's secure location) to upload to the php script at " http://www.mydomain.com/RestOfURL/myScript.php" (which is both not secure and not a subdomain, elimating those two potential issues).

          However, at this point when my mac users upload a file, the upload goes to 100%, but then the php script does nothing with it, and instead my users get an HTTP 404 error. I have had mac users test Safari, FireFox, and IE with both Flash Player 8 and 9.

          I have also seen the following potential fix:


          Any http errors such as 403, 406 or where a file upload goes to a 100% but doesn't show up on the server is a result of the mod_security. Mod_sercurity blocks the post request of flash because it is missing a ":". To correct this problem create or find the .htaccess file in your root directory then type in:

          SecFilterEngine Off
          SecFilterScanPOST Off

          that should correct your problem.


          However, my server help guy tells me that mod_security is not enabled on the server configuration, so that is NOT causing the problem.

          Soooo.... that is all of the potential fixes I have come across. Has anyone else ever tried to get the FileReference.upLoad method to work from a Macintosh, uploading from one domain to another? Again, this all worked fine when the .swf file and the php script were within the same domain.

          Any ideas anyone? Particularly why it would have worked from macs when both files are in the same domain, but now doesn't work when the .swf and php files are in different domains?

          Thank you guys very much for your thoughts,

          Andy