Thanks, it's not working, here is what I've tried:

var bar:ByteArray;
..... I put data in the byte array... I've checked the length, it's
about 4k

var urlu:URLRequest = new URLRequest(
'http://www.mysite.com/fileup.php' );

urlu.data = bar;
urlu.method = URLRequestMethod.POST;
urlu.requestHeaders = new Array(new URLRequestHeader("Content-Type"
,"multipart/form-data"));

var urll:URLLoader = new URLLoader();
urll.load(urlu);

The $_FILES array is empty. I've also tried:

var variables:URLVariables = new URLVariables();
variables.Filedata = bar;
urlu.data = variables;

The $_FILES array is always empty.



--- In flexcoders@yahoogroups.com, "Luís Gustavo Sanabio"
<[EMAIL PROTECTED]> wrote:
>
> Hi rigidcode,
> 
>    Send the bytearray using URLLoader with $POST. I think that you
need to
> send the apropriate header. I did it, but I don't remember well.
> 
>    At PHP, use:
>     if(is_uploaded_file($_FILES["Filedata"]["tmp_name"]))
>     $_FILES["Filedata"]["tmp_name"]
> 
> Gustavo Sanabio
> 
> 
> 2006/6/6, Tim Scollick <[EMAIL PROTECTED]>:
> >
> >  I might be wrong but I think that if you wanted it in the files
array,
> > you would have to:
> > 1.  Get the ByteArray.
> > 2.  Send it to the server to make the jpg.
> > 3.  Load the jpg into Flash.
> > 4.  Send it again in the files array.
> >
> > I think it would be easier and more effiicient to send the
ByteArray to
> > make the jpeg and then send the other files independently (I'm
assuming that
> > you're sending it with other files).
> >
> >  On 6/6/06, rigidcode <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > If I make a ByteArray of jpeg data, how do I send it to the
server in
> > > such a way that PHP will have it in it's $_FILES array? If I
just set
> > > the URLRequest.data property to the ByteArray, then it won't have a
> > > filename, or a variable name, to refer to in the php.
> > >
> > > http://us3.php.net/manual/en/features.file-upload.php
> > >
> > >
> > 
> >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to