• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Upload urgent

 
Arul anandham
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai
I am using html FILE Tag . In This I want to give the file path directly not by selecting throw browser button.
How It cab be.
If Possible post sample code
Bai
Arul
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18100
51
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
response.setContentType("application/msword");
response.setHeader("Pragma" , "no-cache");
response.setHeader("Cache-Control" , "no-cache");
response.setDateHeader("Expires" , 0);
response.setHeader("Content-Disposition" , "inline; " + "filename=\"MailingLists.rtf\"");
response.setHeader("Content-Description" ,
"Display database as RTF");
====
It's the Content-Disposition that does it. Depending on the browser, you can select in-the-browser viewing, automatic download (attachment) or other options.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic