0 Replies Latest reply on Mar 31, 2012 11:38 AM by 56231

    Anyone use Flex with php for file upload? PHP Notice:  Undefined index:  Filedata


      My code works. It uploads the file and inputs the file name into a database, but I can't shake this php notice. I think php is looking for multipart/form-data from the HTML form tag.

      <form action="upload.php"  enctype="multipart/form-data"/>


      But I am using flex. The multipart/form-data info is sent as the second default argument of the upload() function. Does anyone have experience with this? Thanks.


      PHP Notice:  Undefined index:  Filedata

      $filename = $_FILES['Filedata']['name'];



      public function selectHandler(event:Event):void {

                      request = new URLRequest(UPLOAD_DIR);

                      try {


                          textarea1.text = "Uploading " + fileRef.name + "...";


                      catch (error:Error) {

                          trace("Unable to upload file.");

                          textarea1.text += "\nUnable to upload file.";