• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp --getting file size

 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
well i have a jsp page which has a list of documents , when i click on the that particular document number then i am able to see the document on a window. well what i want is that if that document size is more than 4mb then i want to prompt for a "download" where by user can have the option of downloading it.
how can i do this?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
- Peter
[This message has been edited by Peter den Haan (edited November 06, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!