PDA

View Full Version : send file via xmlrequest()


looka
09-21-2005, 11:19 AM
so, if there is a way to send and receive some data through this xmlRequest() method, can i send files too?

do i need some headers to be set up and how?


another thing - how gmail dynamicly creates 'add another file' links and how this 'browse' window is called in javascript (and where the file source is stored...)?


thanks!

Alex Vincent
09-23-2005, 10:30 AM
If you mean XMLHttpRequest, I know the answer is yes. The body of your message will have to be set up in multipart/form-data format, and the HTTP method should be POST.

I did something like this for http://serverpost.mozdev.org -- it's a simple widget, so looking at the serverpost.xml file might help you a lot.