views:

157

answers:

1

I have tried two flash upload components, swfupload and uploadify, and both seem to generate POSTs with a "Filename" parameter. My problem is that the service I'm posting to has a strictly specified set of allowed parameters and Filename is not one of them.

So, is it at all possible to remove this parameter from the post?

A: 

A quick look at the docs reveals that you can change the uploadDataFieldName, which is by default "Filedata", by setting the second parameter of the upload() method. Docs doesn't say anything about the Filename parameter though, so I guess that's a no.

Amarghosh
I thought the question was about swfupload and uploadify (which are 3rd-party products), not the AS3 FileReference class.
Richard Inglis
@rich I believe swfupload and uploadify use `FileReference` class in the background. Unless they are targeting only Flash player 10 users, there is no way to access the file content inside the SWF itself.
Amarghosh
Yes, I have looked at the docs and it says: "The following sample HTTP POST request is sent from Flash Player to a server-side script if no parameters are specified: ... Content-Disposition: form-data; name="Filename"...