Eqbal said:
Thanks for your help. I can upload files now. How do I now download it
to display in a browser? I know I have to get it into a BLOB field
then do some kind of streaming? How would I set the filename?
Any sample code?
THINK! That's what programming is all about. What if you were to
have a servlet which accepts query parameters? Perhaps the URL
would look something like this:
http://www.your.org/fetchServlet?id=xxx
Your doGet method could then retrieve the parameter by invoking
getQueryString on the HttpServletRequest.
So maybe you use the primary key of the database record as the
parameter. Then it's a simple matter of performing the database
lookup, getting the BLOB and invoking setContentType on the
HttpServletResponse. Oh, invoke setContentLength as well.
Stream the data from the BLOB to the client.
Now if you want me to program this all for you then we'd better
draw up a contract, therwise you're on your own. I've given
you more than enough information to get the job done.
If someone wants to give you code for free then that's their
choice...