tags:

views:

1842

answers:

2

Going over the file references in a FileReferenceList calling upload on each one means the files are uploaded as separate requests.

I want to upload a bunch of file in one POST (and I already have a ASHX handler that will accept it).

Any ideas?

+1  A: 

AFAIK that is not possible.

From the docs:

The FileReferenceList class lets the user select one or more files to upload to a server-side script. The file upload is handled by the FileReference.upload() method, which must be called on each file that the user selects.

...and...

Uploading multiple files requires you to upload each of the selected files by using FileReference.upload()

You could perhaps create a zip with the AS3 zip library and send that to the server.

Christophe Herreman
I'd rather not. It's probably possible to do it with lower level Flash API. What I'm doing right now is returning a cookie between files do identify the uploader.
Assaf Lavie
A: 

No you cannot, its a security restriction of the Flash player. You can simulate File upload with Action Script (usefull if you want to send data but no User files).

Its the same with Flash 10, so maybe on Flash 11...