how can I modify the upload post ?

Hello,

I'm new here and I have a very special problem:

I would like to use SWFUpload with the Eprise CMS. The CMS has an event called callReceiveData to upload a single file. I got it working with SWFUpload, but the event does only create an empty file with the filename. The binary data is completely missing. Unfortunately I don't have any options to change these event.

So I used a sniffer to see the differences between an upload through a web formular and SWFUPload.

This is an upload with a web formular:
-----------------------------36912544713369
Content-Disposition: form-data; name="wwwwuploadpath"; filename="CSU_Logo_modern.jpg"
Content-Type: image/jpeg

ÿØÿí8Photoshop 3.0 8BIM [binary data continues here ...]

And this is an upload with SWFUpload:
------------ae0cH2cH2Ef1ei4GI3gL6ei4gL6Ef1
Content-Disposition: form-data; name="Filename"

CSU_Logo_modern.jpg
------------ae0cH2cH2Ef1ei4GI3gL6ei4gL6Ef1
Content-Disposition: form-data; name="Filedata"; filename="CSU_Logo_modern.jpg"
Content-Type: application/octet-stream

ÿØÿí8Photoshop 3.0 8BIM [binary data continues here ...]

As you can see SWFUpload generates the Content-Disposition twice!

So my CMS does only upload the first Content-Disposition. But I just need the second one. How can I remove the following code from every upload?

------------ae0cH2cH2Ef1ei4GI3gL6ei4gL6Ef1
Content-Disposition: form-data; name="Filename"

CSU_Logo_modern.jpg

I would be happy about any help. Thanks,

gyphie's picture

Mulipart/form-data

SWFUpload uses a multipart/form-data style submit which is an extremely common way to submit HTML forms.

Probably you need to change the post name from "Filename" to "wwwwuploadpath" using the file_post_name settings:


new SWFUpload({
upload_url: "example.com/upload.php",
file_post_name: "wwwwuploadpath"
// and the rest of the settings are excluded here for brevity.
});

unfortunately that does not

unfortunately that does not solve the problem. I already tried it with different file_post_name settings.

Some problem

Same problem here. I get an empty file, but not all the time.
How to solve / work around?

ok, I think it's a problem

ok, I think it's a problem with IIS. Has anyone got SWFUPLOAD to work with IIS and without PHP ?

gyphie's picture

IIS and ASP.Net

I run SWFUpload on IIS 5 and 6 over ASP.Net 1.1 and 2.0 without any major problems (that haven't already been worked around in the demos or sample code).