Wednesday, December 19, 2001 10:19 AM
You'll have to do this manually, setting the content-type of the response to multipart/form-data or whatever and then serving each of your files between 'boundaries'.
You'll have to do your own content-length calculations, which means that this process can get very bulky in memory. Can a database BLOB tell you how big it is? If so (and you trust the value), you could use that value.
As for content-type, you should store the content-type of the file when it was uploaded and inserted into the database. Just create a separate column with the text of the content-type. Just spit this our for each of your parts of your multipart response.
Lastly, consider having the client request these documents one-at-a-time, instead of using a multipart response. I'm not sure how browsers will react to multipart responses. I know that I'd rather see a PDF in my browser window than having to download three of them at once and then run them off my own computer.
Hope that helps,