Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use File download using CommonsFile API

 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used CommonsFile to upload a file to my server and write the BLOB into the database. When i retrieve the Blob from the database how can i provide it for the user to download as file. Should i write it to a File before i send it to the client. or can i send the Input/Output stream directly to the client by setting the appropriate response type? I am not able to get wat to do. Help me on this regard

Regards
Surendarprabu
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the point in writing to file on the webserver.
I would try streaming it right to the browser.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic