You must first write a servlet that sends the binary to the user

Then when the user clicks on the button you call the servlet with the
proper parameter.

Here is an excerpt from our servlet implementation

            response.reset();

            response.setContentType("application/octet-stream");
            response.setContentLength(contentLength);
            response.setHeader("Content-disposition", "attachment;
filename=\"" + filename + "\"");
            output = new
BufferedOutputStream(response.getOutputStream());
            int data = input.read();
            while (data != -1)
            {
                output.write(data);
                data = input.read();
            }
            output.flush();


When the user clicks on the button you must call a

On May 30, 8:55 am, Myth17 <[email protected]> wrote:
> I was trying to fetch a Feed object which had 'Blob' as one of its
> attribute(A random file attachment). However I realized that we cant use
> Blob on the Client side code.
> What should I use as an alternative?
>
> Perhaps I could pass byte arrays around but that would be a large amount of
> data for multiple feeds. I would want user to click on a button on the Feed
> view to fetch the Attachment. How can I solve the problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to