nishanth shanmugam

Greenhorn
+ Follow
since Dec 16, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nishanth shanmugam

Bear Bibeault wrote:You cannot "download" to an iPad and do anything else but display the file because there is no user-visible file system to write to.


ok.. but need to display it in a new tab (iPad can support new tabs right)
12 years ago

Rob Spoor wrote:Does the iPad even support more than 1 (browser) window at a time?


New Tab is possible right?
12 years ago

Bear Bibeault wrote:Again, where would it download it to?


If downloading is not possinble means, just opening it in a new window is enough for me.
12 years ago

Bear Bibeault wrote:As the iPad (not IPAD) has no user-accessible file system, what else would you expect it to do?



Thanks For Correcting Me.. In iPad i'm just trying to download a .csv file for a button action. But the csv file just replaaces the parent window. How can i force it to display a save or open promt before downloading it... (Or please tell me whether we can do it or not) or atleast i need it to opened in a new browser window
12 years ago
Hi I was trying to download a .csv file from my web application using Content-Disposition
here is my code

response.setContentType("application/octet-stream");
}

filename = filename.concat(downloadType);
response.setHeader("Content-Disposition","attachment; filename="+filename+";");
//response.setHeader("Content-Disposition","application/octet-stream; filename="+filename+";");


String source = (String)ivHttpRequest.getAttribute("downloadFile");
if(downloadType.equals(".txt")) {
source = Utils.decodeHtmlEntities(source);
}
byte [] byteArray;

if(source == null)
{
// use ivRequest instead
String source2 = (String)ivRequest.getAttribute("downloadFile");
if(downloadType.equals(".txt")){
source2 = Utils.decodeHtmlEntities(source2);
}
byteArray = source2.getBytes();
}
else
{
byteArray = source.getBytes();
}
ServletOutputStream out = response.getOutputStream();
out.write(byteArray);
out.close();
I'm able to download the file in all the browsers, But while using IPAD the content of the file replaces the existing window (Parent Window) without asking for Save or Open
Please let me know is there any special content type or anythinmg else i have to chanage..
THe problem i faced only with IPAD
12 years ago