• Post Reply Bookmark Topic Watch Topic
  • New Topic

File Download issue...  RSS feed

 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I am downloading a file, the file is being shown in binary form in the browser, instaed of getting a windows download dialog box.

Thanks in advance to the responders.
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. what is the file type you are downloading?

2. what is value you are assigning to content-type header?
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
contenet type:
is dynamically set. when a file is uploaded, formfile object is used to get the content type and is used for setting the content type.

content header:
response.setHeader("Content-Disposition", "attachmnet:filename="+fileName);
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my guess is that, content-type and the file type is conflicting each other.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is probably a Red Herring, but you misspelled "attachment" in your header value.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe. I have fixed and is fine now...
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Puthriah Sarma,

Please tell us how you fixed it? It might help others who suffer with same kind of issue.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!