Loading ...
Sorry, an error occurred while loading the content.

Re: new yahoo uploader and php

Expand Messages
  • Allen Rabinovich
    Not an expert in PHP, but you may want to make sure that tmp_name and name properties of $file are correctly assigned and equal. This might be a difference
    Message 1 of 2 , Nov 13, 2008
    • 0 Attachment
      Not an expert in PHP, but you may want to make sure that tmp_name and
      name properties of $file are correctly assigned and equal. This might
      be a difference between the Flash upload requests and standard HTTP
      upload requests.

      - Allen

      --- In ydn-javascript@yahoogroups.com, "danprimetse" <danprime@...> wrote:
      >
      > Hi There,
      >
      > Has anyone had success using the new yahoo uploader (
      > http://developer.yahoo.com/yui/uploader ). I can get it to upload but
      > then the file seems to disappear. I'm not sure where the file has gone.
      >
      > I use the following php script
      >
      > <?php
      > $uploads_dir = getcwd(); //The working directory of this php script
      > $uploads_dir .= "/uploads/"; //Appends the uploads folder path
      >
      > foreach ( $_FILES as $fieldName=> $file)
      > {
      > //This foreach was in the example
      >
      > //Create destination
      > $dest = $uploads_dir . $file['name'];
      >
      > //Move file
      > move_uploaded_file($file['tmp_name'], "$dest");
      >
      > }
      >
      > ?>
      >
      > When I used this php script with a regular File Upload it works fine
      > but it doesn't seem to be compatible with the Yahoo Uploader.
      >
      > Thoughts?
      >
      > Thanks in advance,
      > -Daniel
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.