James Drinkard
unread,Dec 7, 2011, 12:16:20 PM12/7/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hello All,
I have a requirement to get a file, upload it to the server and then get the stream of bytes back in some server-side code. I have to pass an inputStream from the file to a calculator module. So I opted to use the fileUpload widget which appears to work fine on the client-side. I see the post on the form.submit, so it appears that the file went to the server. I then use an RPC service call to try and pull the file stream off the server. I use an serviceImpl servlet (extends RemoteServiceServlet) and I try to pull the stream back with this line of code in the servlet:
inputStream = request.getInputStream();
However, it doesn't appear that I'm getting anything back at all. Is this doable and is this the correct approach? I've done lots of RPC calls, so that is what I thought was the right way to do this, but now I'm not sure. I've never worked with the fileUpload widget before and opted to use it over the GWTUploader widget as a simpler, fast solution.
Any ideas as to how to do this?