Welcome, Guest
  • Author Topic: Questione on Uploading files with Flash 8  (Read 1316 times)

    Bola033

    • Server what's that
    • *
    • Posts: 5
      • View Profile
    Questione on Uploading files with Flash 8
    « on: 05/15/10, 07:00 »
    Hi, I have test this tutorial and it worked. I just have some question.
    1.  for(i in selectedFile) details.text +="<b>"+i+":</b> "+selectedFile+"\n", if I'm right this pick up the value of size and other stuff, but I don't now this string works, someone who can explaine this more? And is it posible to just get the size?

    2. I also need to get high and width of the picture, how do I get that

    this is the url to the tutorial: http://www.flash-db.com/Tutorials/upload/
    tanks for answer
     

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Questione on Uploading files with Flash 8
    « Reply #1 on: 05/15/10, 08:01 »
    have a look into the GD library at your PHP manual.

    Ther you can read the picture size, and if you like, even resize the picture to any size you like.
    happy flashing
    8)
    Ronald

    Bola033

    • Server what's that
    • *
    • Posts: 5
      • View Profile
    Re: Questione on Uploading files with Flash 8
    « Reply #2 on: 05/16/10, 06:15 »
    Ok, I've found some useful ting in the php manual. And I can get width and hight with this function: list($width, $height, $type, $attr) = getimagesize(); the problem is that I don't know what to put in  getimagesize();  I have tried with a "hard coded" (don't know the word) for examle: files/image.jpg and it works perfect. But I want the picture that the user has picked so I've tried with $_FILES['Filedata']['name'],  $_FILES['name'] and so on but it dosen't work for me. What should I put in between the parenthesis?

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Questione on Uploading files with Flash 8
    « Reply #3 on: 05/16/10, 11:52 »
    $_FILES has the files you uploaded.
    If you use it without upload process, it will be empty.

    use this:
    Code: [Select]
    $size=getimagesize($src);
    $width= $size[0];
    $height= $size[1];

    where $src is the path and filename of the image.
    By that time, the image must be saved to disk.
    happy flashing
    8)
    Ronald