Welcome to iPadForums.net Guest - Click Here to Register

Hi I was trying to download a .csv file from my web application using Content-Disposi

This is a discussion on Hi I was trying to download a .csv file from my web application using Content-Disposi within the iPad Help forums, part of the Apple iPad Discussions category; 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; ...

iPadForums.net is the original Apple iPad Forum! Registered Users do not see these ads. Please Register - It's Free!
+ Reply to Thread
Results 1 to 1 of 1
  1. #1
    iPF Noob
    Member #
    154296
    Join Date
    Jan 2012
    Posts
    1

    Lightbulb Hi I was trying to download a .csv file from my web application using Content-Disposi

    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

  2. Ads



Home | Forum | Active Topics | What's New

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. PDF Files download but have empty content
    By Reader777 in forum iPad Help
    Replies: 8
    Last Post: 10-12-2011, 06:57 PM
  2. Replies: 6
    Last Post: 10-08-2011, 06:26 AM
  3. Can I download Itunes content directly to ipad?
    By jacobbones in forum iPad 2 Forum
    Replies: 4
    Last Post: 05-06-2011, 06:04 AM
  4. Standard art application file types?
    By Klashnikov Kid in forum iPad FAQ
    Replies: 1
    Last Post: 12-08-2010, 12:54 AM
  5. Replies: 0
    Last Post: 10-03-2010, 07:49 AM

Search tags for this page

csv ipad

,

download csv file on ipad

,

download csv from website in ipad

,

download csv to ipad

,

ipad download csv

,

ipad open .csv files

,
ipad save .csv
,

ipad save csv link

Click on a term to search for related topics.

Tags for this Thread