
03-14-2007, 03:29 PM
|
|
Junior Member
|
|
Join Date: Mar 2007
Posts: 1
|
|
file downloading.
Hi All,
I uploaded a file as doc file and stored into the data base as a blob of mysql data base.
I am writing code for down loading a files. For this i am seting the response headers as follows...
response.setContentType("application/msword");
response.setHeader("Content-Disposition", "attachment; filename=\""
+ fileName + ".doc\"");
response.setHeader("cache-control", "no-cache");
response.setDateHeader("max-age", 0);
response.setHeader("cache-control", "no-cache");
response.setHeader("Transfer-Encoding", "deflate");
response.setHeader("Content-Encoding", "en-us");
response.setContentLength(pasteResume.length());
response.setHeader("Connection", "keep-alive");
response.setHeader("Expires", "0");
response.setHeader("Vary", "Accept-Language,Accept-Encoding,User-Agent");
response.setHeader("Pragma", "no-cache");
response.setHeader("Content-Type","MIME"); //"text/html;;charset=%s % charset"
request.setCharacterEncoding("UTF-8");
response.setHeader("Content-Language","lang");
PROBLEMS IS::
When ever i am clicking the download link to download this file ,It start opening, but before it opening the file a dialog bix appears as follows..in linux and windows also
properties
Charcter Set : Unicode (UTF-
Default Fonts : Nimbus Roman No9 L
Language : English(USA)
Paragraph Break : CR&LF CK LF
Now if i click OK it opens the file correctly . I want to set it as default , So that this dialog box should not apper.
If any one knows why this box is appearing please tell me soon.
Thanks & Regards
karunakr reddy . kona
|