2 Replies Latest reply on Apr 15, 2007 1:34 AM by tfiff

    File upload fails when using SSL

    tfiff Level 1
      (I have seen that there are a couple of other messages on this topic which haven't been answered! - common Adobe! :)
      The following code works fine if I change the URL below to not use SSL ( http://) otherwise it triggers an IO error if SSL is used. The web server shows that the SSL negotiation worked, but that the Flash closes the connection due to it's own error.
      Any ideas appreciated!

      The simplified code looks like:

      var uploadURL:URLRequest = new URLRequest("https://server.com/FileUpload");
      var uploadFile:FileReference;

      private function FileSelected(event:Event):void
      private function UploadComplete(event:Event):void
      Alert.show("Upload Complete!");
      private function UploadIOErrorHandler(event:IOErrorEvent):void
      Alert.show(event.text,"IO Error Encountered During Upload");
      private function ClickUpload(e:Event):void
      uploadURL.method = URLRequestMethod.POST;
      uploadFile = new FileReference();
      uploadFile.addEventListener(Event.COMPLETE, UploadComplete);
      uploadFile.addEventListener(Event.SELECT, FileSelected);
      uploadFile.addEventListener(IOErrorEvent.IO_ERROR, UploadIOErrorHandler);