0 Replies Latest reply on Aug 18, 2006 12:21 AM by cancrexo

    filereference issue & php

      Hi. After uploading an image using the Fileference class, i need to

      know if it's moving & renamig is done oke in the server. I mean, i need to

      know if there is any error during the renaming process.
      For the upload i use this As code:

      var cadena="html/upload.php?idAnuncio="+idAnuncio;


      and the upload.php script:
      $MAXIMUM_FILESIZE = 1024 * 65; // 65 KB
      if ($_FILES['Filedata']['size']>0 && $_FILES['Filedata']['size'] <=

      if(move_uploaded_file($_FILES['Filedata']['tmp_name'], "images/".$_FILES['Filedata']['name'])){
      echo "&error=0&"; // Everything OK
      echo "&error=1&"; // Renamig failed :-(
      // No pic
      echo "&error=1&";

      Well. The question is how can i read the error variable (&error=1&). As u

      can c i've tried using

      resultado=resultado=_parent.fotoMc.fileRef.upload(cadena); but this

      only returns true if the file uploads sucessfully.