1. Due to the recent site upgrade, the iPadForums (iPF) App will no longer work. The new iPadForums.net website has been designed from the ground up to work perfectly from any mobile, tablet, or desktop computer using the built in internet browser. Create a shortcut to iPadForums.net on your home screen by following these steps: Create an icon for iPadForums.net

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

Discussion in 'iPad Help' started by sulokarthi, Jan 19, 2012.

  1. sulokarthi
    Offline

    sulokarthi iPF Noob

    Joined:
    Jan 19, 2012
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Ratings:
    +0 / 0
    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

Share This Page

Search tags for this page

download csv file in ipad

,

download csv file ipad

,

how can i view csv files on ipad

,

how to download a csv file in outlook web app from safari

,

how to download csv file using ipad

,

ipad content-dispostion csv

,

ipad download content-disposition attachment

,

ipad download csv from web

,

ipad download excel content disposition