Download File by url in another server? (Content-Disposition","attachment)

Can the file be downloaded by a url in another server?
ie.
Server A: JSP program
Server B: filepath + filename = "http://xxx.com/xx/x.doc"
e.g.
    response.setContentType("APPLICATION/OCTET-STREAM");
       response.setHeader("Content-disposition", "inline" );            
       response.setHeader("Content-Disposition","attachment; filename=\""+ fn.trim() + "\"");     
          java.io.FileInputStream fileInputStream =new java.io.FileInputStream(filepath+filename);
          int i;          
          while ((i=fileInputStream.read()) != -1) {
                  out.write(i);
          fileInputStream.close();
          out.close();     

I tried this but it doesn't work. In the report column it shows up as Download" >_ .
This seems to indicate that the href code is not being interpreted correctly.
Following is exactly what I have in the URL field:
<a href="#OWNER#.DOWNLOAD_MY_FILE?p_file=#NOTIFICATION_SEQ_ID#&v_type=SUMMARY">Download</a>Yes, I have granted execute rights to the procedure.
Thanks,
Dale

Similar Messages

  • ("Content-Disposition", "attachment;filename=x") works in Netscape; not IE.

    I'm sending an ASCII file back to the client using the following method:
    private void sendFile(String fullFilePath, HttpServletResponse res) {
    if(fullFilePath!=null) {
    try {
    res.setContentType("application/text/plain"); //this will be an unknown type
    res.setHeader("Content-Disposition", "attachment;filename=" + fullFilePath);
    FileInputStream fi = new FileInputStream(fullFilePath);
    OutputStream out = res.getOutputStream();
    while(true) {
    int d = fi.read();
    out.write(d);
    if(fi.available()==0)
    break;
    fi.close();
    out.close();
    catch (Exception e) {
    Logger.err.println("Error in TableQueryServlet.sendFile(): " + e,Log.ERROR);
    This works great in Navigator. The filename that it defaults to in the Save file dialog box is the same one I set it to using the fullFilePath string - including the .txt extension. However, in IE it ignores my filename and assigns its own random filename. Any ideas how I can get this to work in IE?

    It's not the greatest, but see the following...
    MS knowledgebase # Q279667

  • Download File from BSP to presentation server.

    Hi all,
    We have a requirement to Download and Upload a file in Standard BSP application HRECM_BDG_MAINT.
    Flow of the logic is : 
    1.  On click on Download button.  A Save file dialog should come and then user will select the path for saving the file.  Then the internal table sholud be save in excel on the presentation server.
    2.  User will modify the excel file.
    3   on click of upload button again the open dialog should come and then user will select the excel file from the presentation server and then file will be uploaded into the BSP application.
    Note : We are very much clear with the functionality.  Over main concern is to get the file dialog popup on the BSP application.
    Changes in the layout (Download & Upload Button) has been created.
    Actually HRECM_BDG_MAINT call another BSP application HR_ECM_BDG_SRV02.
    Controller class of of page budget_details.bsp (HR_ECM_BDG_SRV02) is CL_HRECM00_BSP_BDG_DETAILS.
    All the button displayed in this BSP page are created at runtime in class (CL_HRECM00_BSP_BDG_DETAILS) in method DO_REQUEST.  We have used enhancement spot and added two more buttons (Download and Upload).
    Now our main problem is to get file dialog popup on the BSP screen when we click on that button.
    Kindly help
    Ankit Gupta

    Hello
    I have a BSP that shows all the client data and generate a file when a boton is push.
    What I need to know is; how can i made that the system generate a file for each client without having the internet explorer pup-up for download each time, furthermore, I want that these files to be located at the local unit C:\.
    The code i have is as follow:
    DATA: fichero TYPE string.
      CONCATENATE 'F' vnomfich '.xls' INTO vnomfich.
    some Browsers have caching problems when loading Excel format
      response->delete_header_field( name = if_http_header_fields=>cache_control ).
      response->delete_header_field( name = if_http_header_fields=>expires ).
      response->delete_header_field( name = if_http_header_fields=>pragma ).
    start Excel viewer either in the Browser or as a separate window
      response->set_header_field( name  = if_http_header_fields=>content_type
                                  value = 'application/vnd.ms-excel' ).
      CONCATENATE ' attachment; filename= ' vnomfich INTO fichero.
      response->set_header_field( name  = 'Content-Disposition'
                                  value = fichero ).
    finally display Excel format in Browser
      response->set_cdata( data = l_output ).
    do not process Layout, response has been rendered
      navigation->response_complete( ).

  • Download file from URL using ADF (urgent help required)

    We have the following requirement:
    On clicking a button we need to download the file present at a particular location(we have the URL).
    I have written the following in .jspx file :
    <af:commandButton  id="btn1" >
                        <af:fileDownloadActionListener contentType="text/plain; charset=utf-8" method="#{bean.getFile}"/>
    </af:commandButton>
    The corresponding method in bean is :
    public void getFile(FacesContext facesContext, OutputStream outputStream) {
    HttpServletResponse response = null;
    ServletOutputStream ouputStream = null;
    currUrl = getFileURL("ID", 281);
    response =
    (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
    try {
    ouputStream = response.getOutputStream();
    ouputStream.write(this.getFileBytes(), 0,this.getFileBytes().length);
    ouputStream.flush();
    ouputStream.close();
    } catch (IOException ioe) {
    System.out.println("IO Exception");
    public byte[] getFileBytes() {
    URLConnection urlConn = null;
    InputStream iStream = null;
    URL url;
    byte[] buf;
    int byteRead;
    try {
    url= new URL("http://hjhj:34104/test.pdf");
    urlConn = url.openConnection();
    iStream = urlConn.getInputStream();
    buf = new byte[5000000];
    byteRead = iStream.read(buf);
    if (byteRead > 0) {
    System.out.println("Downloaded Successfully.");
    return buf;
    } catch (FileNotFoundException fnfe) {
    System.out.println("File not found Exception");
    fnfe.printStackTrace();
    } catch (Exception e) {
    System.out.println("Exception:" + e.getMessage());
    e.printStackTrace();
    } finally {
    try {
    iStream.close();
    } catch (IOException e) {
    System.out.println("IO Exception");
    e.printStackTrace();
    System.out.println("File");
    return null;
    The file is opening in same window but in some encrypted format. My requirement is to :
    1. Have a pop (as in Mozilla or IE) which asks if I want to save the file or open.
    2. Depending on that the file should be opened in pdf format and not in browser same window neither in browser tab.

    Jdev version : 11.1.2.1.0
    in .jspx file : we have a button. On clicking the button file from URL should be downloaded. I have used fileDownloadActionListener in commandButton. Corresponding code :
    <af:commandButton  id="btn1" >
                        <af:fileDownloadActionListener contentType="text/plain; charset=utf-8" method="#{bean.getFile}"/>
    </af:commandButton>
    in bean class : the method corresponding to fileDownloadActionListener is :
    public void getFile(FacesContext facesContext, OutputStream outputStream) {
         HttpServletResponse response = null;
         ServletOutputStream ouputStream = null;
         response =(HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
         try {
              ouputStream = response.getOutputStream();
              ouputStream.write(this.getFileBytes(), 0,this.getFileBytes().length);
              ouputStream.flush();
              ouputStream.close();
              } catch (IOException ioe) {
                   System.out.println("IO Exception");
    public byte[] getFileBytes() {
         URLConnection urlConn = null;
         InputStream iStream = null;
         URL url;
         byte[] buf;
         int byteRead;
         try {
              url= new URL("http://hjhj:34104/test");
              urlConn = url.openConnection();
              iStream = urlConn.getInputStream();
              buf = new byte[5000000];
              byteRead = iStream.read(buf);
              if (byteRead > 0) {
                   System.out.println("Downloaded Successfully.");
              return buf;   
        } catch (FileNotFoundException fnfe) {
              System.out.println("File not found Exception");
         } catch (Exception e) {
              System.out.println("IO Exception");
    The URL given in the code is for a file which can be a PDF file or an EXCEL file.
    My requirement is when i click the button:
    1. A pop should come (as in Mozilla or IE) which asks if I want to save the file or open.
    2. if i click on save file should save in a particular location.
    3. if i click on open it should open as PDF/EXCEL format and NOT in browser.
    Message was edited by: 1001638

  • How to upload and download files using FTP to a server(webserver) in JSP

    I have to upload and download multiple files Of(size >5 MB)using FTP to a
    Server(webserver) in JSP
    how to do that ?

    Or he could create his own tag libraries, no? :)One supposes that, technically, one could create a taglib wrapper around an existing FTP library. There might be licensing issues with distributing that taglib wrapper.
    Of course, one could find the FTP RFC online, read it, and implement one's own FTP client implementation, complete with a tag library access point.

  • Some help needed regarding Files and URLs on a server

    I don't get it - my applet works in a local directory, but not on a server. This has to do with the loading of files (I load an array of images to use, but when I attempt to use that array, it comes up with the error ArrayIndexOutOfBounds), but I can't understand what the problem is...
    I have a code that loads files (using File objects) from the current directory (a .jar file) into the program. I do not simply type in the file names - I set it so that the program searches for them based on a prefix in the file name. This works fine on my computer, and I never navigate to files outside of the .jar file. Why might this have a problem on a server? Would URL objects be more appropriate?
    Note: I alter the file base String in this way before loading it (this stands for the current directory)
    fileBase = applet.codeBase.toString().replace('\\', '/');codeBase is simply the applet's codeBase() method put into a URL variable. The replace statement is there so that there are no backslashes. And this works perfectly on my computer. Any help? Would it work if I used a URL instead? If so, how do I perform a search function with a URL (so that all the filenames within a certain directory are returned as Strings)?

    Thanks for the info, it helps a lot. You say there is no "practical" way to search for a file under a URL path. What I am trying to do is load a file that begins with a particular prefix. (eg. I wish to load a file called "funnyImage0011204924." However, the numbers after the prefix "funnyImage" are variable, and might require change in the future. Is it possible to load any file with the prefix "funnyImage," using URL methods? Would I need to create a new class? Is this impossible?)
    Please remember that I do not plan to go outside the .jar file, so there is no point in trying to get around server permissions and all that if it is unnecessary.

  • Downloaded files originally purchased on another computer aren't playing in full

    Files I had downloaded from iTunes on my old computer only partly play on my new computer. I have authourised the new computer and checked my user name has remained the same.

    Welcome to the Apple Community.
    Are you not able to uncheck the item in your iTunes sync settings so as to remove it from the phone and then resync it again.

  • Download file via jsp

    dear all,
    to download a *.txt-file via jsp i use following code:
    java.io.File file = new java.io.File("C:\\FileName.txt");
    response.setHeader("Content-Disposition", "attachment;filename=\""+file.getName()+"\";");
    response.setContentType("APPLICATION/OCTET-STREAM");
    response.setContentLength((int) file.length());
    if(file.isFile()){
         java.io.FileInputStream fis = new java.io.FileInputStream(file);
         java.io.BufferedOutputStream bos = new java.io.BufferedOutputStream(response.getOutputStream());
         byte b[] = new byte[(int)file.length()];
         int read = 0;
         while((read = fis.read(b)) != -1){
              bos.write(b,0,read);
         bos.flush();
         fis.close();
         bos.close();
    } the problem is:
    the file will be displayed in the browser IE6 (inline), but i want to open a save-dialog!
    any ideas?!
    thanks for help. andy

    up to now i tried another browser (mozilla firebird) and several settings about the contenttype like:
    - application/x-download
    - application/x-msdownload
    - application/x-octet-stream
    - application/octet-stream
    - application/download
    ... and the file-name like:
    *.zip
    *.txt
    *.exe
    but the browser shows the content of the file always inline (even *.zip and *.exe files!!).
    anyway, thank you for help.
    andy

  • How to specify the charatcer encoding for the parametes Content-Disposition

    I want to download a file with chinese name .
    response.setHeader("Content-Disposition","attachment; filename=" + fileName);
    the above part of code is working fine for english file names. but i am facing problem when i try to get file with chinese name .
    The pop up window is not defaulting with the chinese name .
    When i searched for net , in one rfc it was specified how to do that one.
    http://www.faqs.org/rfcs/rfc2184.html.
    I tried it but .. could not able to solve the problem.

    Hi,
    Am facing similar problem with russian and japanese characters in file name.
    I tried the UrlEncoder.encode(filename, "utf-8') api to encode the file name. This worked fine with IE but firefox and safari shows junk for japanese/russian characters.
    Anyone having an idea abt this?
    Thanks,
    Kapil

  • Access/download file from server.

    have a problem. When I am trying to save/open a file from server(secure) which uses HTTPS, its displaying error message:
    Internet Explorer cannot download ...File_name.doc from Server_name.
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
    My code is below. Please help me out.
    Its working with my localhost(http) and with Firefix browser. Its something to do with http and IE 6.
    <java>
    if (!request.getScheme().equals("https"))
    response.setHeader("Pragma", "no-cache");
         String fileName=request.getParameter("instruction");
         //filename = filename.replaceAll( "\\W*", "" ) ;
         String DirName = request.getParameter("directory");
         String value = (DirName+"/"+fileName);
                   File f = new File (value);
                   response.setContentType("application/msword");
                   //set the header and also the Name by which user will be prompted to save
                   response.setHeader("Content-disposition", "attachment; filename=" + fileName);
                   InputStream in = new FileInputStream(f);
                   out.clearBuffer();          
                   int bit = 256;
                   int i = 0;
                   try {
                        while ((bit) >= 0) {
                             bit = in.read();
                             out.write(bit);
                   } catch (IOException ioe) {
                        ioe.printStackTrace(System.out);
                   out.flush();
                   out.close();
                   in.close();     
    </java>

    HI,
    To avoid redirection, Safari users are having good luck with Open DNS Free / Basic
    Carolyn

  • Downloading File from server

    I have written more or less same code like following
    to send file from server to browser in other web applications, where browser displays Save As dialog box
    to the user, but the same code doesn't work with portal.
    following code part of a page flow
    <pre>
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward doUploadFile()
    HttpServletResponse res = this.getResponse();
    res.setContentType("application/x-download");
    String filename="C:\\somefile.pdf";
    File file = new File(filename);
    res.setContentLength((int)file.length());
    res.setHeader("Content-Disposition", "attachment;
    filename=" +filename);
    // Send the file.
    InputStream in=null;
    OutputStream out=null;
    try
    out = res.getOutputStream( );
    in = new BufferedInputStream(
    new FileInputStream(filename));
    byte[  ] buf = new byte[4 * 1024]; // 4K buffer
    int bytesRead;
    while ((bytesRead = in.read(buf)) != -1)
    out.write(buf, 0, bytesRead);
    finally
    if (in != null) in.close();
    if (out!= null) out.close();
    return new Forward("success");
    </pre>
    following is the JSP code to trigger the action of file
    download.
    <pre>
    <netui:form action="doUploadFile">
    <netui:button type="submit" value="Upload File" />
    </netui:form>
    </pre>
    Any clue ?

    Hi,
    Im having exactly the same problem. Did you find a way to do this.
    Thanks Chris

  • Force file download? Content-Disposition?

    Hello,
    I recently started using an X-Serve with OS X 10.4.8 installed.
    This is my media server, and I'm trying to configure it to force a file download dialog when an mp3 file is pulled.
    I used to do this by using an .htaccess file with the following:
    <FilesMatch "*.mp3">
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </FilesMatch>
    But it doesn't seem to work now.
    Do I have to add a new Content Handler? If so, what do I put to force a file download?
    Thanks very much

    See Oracle Metalink,
    ..Oracle Portal Technical Forum,
    ....Subject: PORTAL - uploading files (file attachments) with file names.
    This message thread outlines javascript code that automatically captures the filename during an upload.

  • Sun JSC2 - How to download files to client

    Hi, imagine a document management site.
    I want to have a list of files with links that users can click to download them.
    Users can upload files (with handy File Upload component), and they get saved as byte streams to a file or database or whatever.
    Now, I have a page with a list of files the user can download. The file name, a link to save the file, and a link to download the file.
    File1.pdf . . . DOWNLOAD IT! . . . SAVE IT!
    The DOWNLOAD IT! link tries to use mime stuff to get the browser to open the file.
    The SAVE IT! link tells the browser to not process the file and always bring up the save as dialog. In both cases, I don't want the browser to open a new page.
    Starting with a byte[], what's the best way to do this? I searched the web, and these forums, but couldn't come up with anything that gave me a place to start from inside JSC2.
    Any ideas on where to start? Thanks in advance!
    Mike

    Hey Winston, here is what I came up with... Very similar, but a little different.
    Java Server Faces File Download Tutorial by Michael Cole
    Java Server Faces, abstracts much of the monotonous detail of web programming, letting application developers develop applications, instead of programming servers.
    This tutorial explains how to dip just a little under the covers to serve files to a browser. The browser can then interpret this binary data using MIME types. Some common MIME types are �text/plain�, �text/html�, or �application/pdf� or �application/x-unknown�.
    How the browser behaves when interacting with these MIME types is based on the client browser's configuration. Because this configuration is different for every browser, let's create two different behaviors:
    * First Behavior: When a link is clicked, the browser downloads and �opens� the file, either displaying the file itself, or choosing an appropriate program: zip file program, pdf program, etc.
    * Second Behavior: The browser always offers to save the file, no matter what.
    At the most basic level, we want to cause this chain of events:
    1. Cause browser to send a request to the server.
    2. Have the server create a response that sends the file to the client.
    For my purposes, the browser should not navigate to a new page for this behavior.
    A mockup might look like this:
    Files you can download:
    Secrets of the Universe.txt
    Open it!
    Save it!
    Perfect love and happiness.pdf
    Open it!
    Save it!
    Make a million dollars now.swf
    Open it!
    Save it!
    To accomplish this, we will execute this code on the server:
    // Find the HttpServletResponse object for this request.
    // With this object, we can create a response that sends the file.
    FacesContext faces = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
    // We can also get information about what the browser requested.
    // This could tell us what data to send
    HttpServletRequest request = (HttpServletRequest) faces.getExternalContext().getRequest();
    // Your data can be stored in a database, generated at runtime, or whatever you choose.
    // We getSomeData() from an arbitrary location. This depends on your application.
    byte[] data = getSomeData(request);
    // In the response, we will specify a file name to present to the user.
    String filename = "myFile.txt";
    // Now we have the data to send, and the response object to send it with.
    // Next we give the browser some hints on what to do with the file.
    // Note that different browsers will behave differently and you have no control over this.
    // We'll use different mime types to implement the different "Open" and "Save" behaviors.
    // "application/x-unknown" will be the MIME type used for the "Save" behavior.
    response.setContentType(mimeType);
    // We tell the browser how much data to expect.
    response.setContentLength(data.length);
    // Cross-browser hack for Firefox 1.0.7 and IE 6 compatibility.
    // IE 6 ignores the MIME type and decides based on the "attachment" or "inline"
    if (mimeType.equals("application/x-unknown")) {
    // Show the "Save As..." dialog
    response.setHeader( "Content-disposition", "attachment; filename=\"" + filename + "\"");
    } else {
    // attempt to "open" the file
    response.setHeader( "Content-disposition", "inline; filename=\"" + filename + "\"");
    // Now we start sending data with the response object.
    // You might consider using a buffer if your data comes from a large file
    // or a database.
    try {
    ServletOutputStream out;
    out = response.getOutputStream();
    out.write(data);
    } catch (IOException e) {
    e.printStackTrace();
    // Lastly and very importantly, we tell Java Server Faces that
    // the request has been handled and not to process it any more.
    faces.responseComplete();
    Now all we have to do is put this code somewhere.
    Step 1: Build the page UI.
    * Create a new page in Java Studio Creator. Let's call it �download.jsp�
    * Make it the start page (right-click)
    * Add a hyperlink component and call it �Open!�
    * If you like, add a static text that describes your file.
    Step 2: Tell Java Server Faces what to do when the hyperlink is clicked.
    * Doubleclick the hyperlink and add this code to it's action:
    public String hyperlink1_action() {
    // TODO: Replace with your code
    DownloadBean d = new DownloadBean();
    d.sendFile("text/plain");
    return null;
    * Compile the download.java and get a �cannot find symbol for class DownloadBean�. Now we have a place to put our code to send the file!
    Step 3: Build the DownloadBean that will serve the file.
    * Go to your "Source Packages" folder and create a new Java class in the project's package. Call this class �DownloadBean�.
    * Copy this code into the class:
    public void sendFile(String mimeType) {
    FacesContext faces = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
    HttpServletRequest request = (HttpServletRequest) faces.getExternalContext().getRequest();
    byte[] data = getSomeData(request);
    String filename = "myFile.txt";
    // Note that different browsers will behave differently and you have no control over this.
    // We'll use different mime types to implement the different "Open" and "Save" behaviors.
    // "application/x-unknown" will be the MIME type used for the "Save" behavior.
    response.setContentType(mimeType);
    response.setContentLength(data.length);
    // Cross-browser hack for Firefox 1.0.7 and IE 6 compatibility.
    // IE 6 ignores the MIME type and decides based on the "attachment" or "inline"
    if (mimeType.equals("application/x-unknown")) {
    // Show the "Save As..." dialog
    response.setHeader( "Content-disposition", "attachment; filename=\"" + filename + "\"");
    } else {
    // attempt to "open" the file
    response.setHeader( "Content-disposition", "inline; filename=\"" + filename + "\"");
    // Now we start sending data with the response object.
    try {
    ServletOutputStream out;
    out = response.getOutputStream();
    out.write(data);
    } catch (IOException e) {
    e.printStackTrace();
    faces.responseComplete();
    * Hit Ctrl-Shift-F to make the code pretty.
    * Try and compile DownloadBean.java. Build->Compile
    * As expected, you will get a variety of �cannot find symbol� errors.
    * Hit Ctrl-Alt-F to clean these up, by automatically adding the proper imports.
    * Try and compile again and you will get a �cannot find symbol� error for the getSomeData() function. That's ok cause we didn't write it yet.
    * Copy this code into the DownloadBean class:
    public byte[] getSomeData(Object o) {
    // ignore the HttpServletRequest object and return some data.
    return "Hello World!".getBytes();
    * Compile the file one last time to get a clean compile.
    Why didn't we put this code directly in the hyperlink1_action() function? Because we are separating the �model� from the "view" and "controller". DownloadBean can be reused in any page of your application now.
    Step 4: Test
    1. Run the project and open the page in the Firefox web browser.
    2. Click the �Open It!� hyperlink
    3. A text file should appear in Firefox that says �Hello World!�
    Great! We sent the file, Firefox interpreted the �text/plain� MIME type, and presented the text as a browser page. This covers our �Open It!� functionality.
    To serve other kinds of files, pass a different MIME type in the sendFile() function.
    For a list of MIME types, check out http://www.webmaster-toolkit.com/mime-types.shtml
    Step 5: Save It! Functionality.
    What if we always want the file to be saved, no matter what foolishness the browser wants to do with the file?
    * Go back to the Design of download.jsp.
    * Add another hyperlink to the page, label it �Save It!�
    * Double click the hyperlink and JSC2 will take you to its action function.
    * Add this code to the function
    public String hyperlink2_action() {
    // TODO: Replace with your code
    DownloadBean d = new DownloadBean();
    d.sendFile("application/x-unknown");
    return null;
    Notice the difference in the MIME type? We changed �text/plain� to �application/x-unknown�. Notice also in the sendFile() function the cross-browser hack to get IE 6.0 to save or open the file.
    * Run the project one last time.
    * Test with Firefox
    * Test with Internet Explorer
    Done!

  • AIR Badge + RewriteRule fails - Downloaded file is not an air file

    Hi everyone!
    I'm not entirely sure my problem comes from RewriteRule but I've searched this forum for topics on corrupted AIR files and the Install Badge and tried almost every possible tip with no luck so I thought maybe my special issue comes from it...
    Here we go:
    I have a server-side script that builds AIR apps which are supposed to be installed (via an Install Badge). Those AIR apps are not stored at a public URL (for security reasons) but read (via PHP) when a specific URL is called. Let me give you an example (with fake paths) :
    The server-side built AIR app is store at /srv/data/air/myApp.air
    A RewriteRule redirects calls to http://www.my-server.com/air/999.air to http://www.my-server.com/air.php?id=999
    The air.php uses the GET id to read the AIR file :
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: private", false);
    header("Content-Type: $mimeType");
    header("Content-Disposition: attachment; filename=$name;" );
    header("Content-Length: ".filesize($path));
    readfile($path);
    With $mimeType="application/vnd.adobe.air-application-installer-package+zip" and $name="999.air"...
    When accessing the rewritten URL directly with a browser, everything is fine: the AIR file can be downloaded and installed as expected.
    But! When using an Install Badge linking to that URL, I get the nasty "The application could not be installed because the AIR file is damaged" message...
    And here's what's stored in .airappinstall.log:
    Starting app install of http://(...)/9889.air
    UI SWF load is complete
    UI initialized
    Downloading file to C:\Documents and Settings\Quentin\Local Settings\Temp\fla19D.tmp
    Received HTTP Response Status event
    Response URL is http://(...)/9889.air
    Downloaded file is not an air file.
    starting cleanup of temporary files
    application installer exiting
    Hum... And I'm stuck.
    Thoughts?
    I have multiple Install Badges in the same page, do you think this can break things?
    I've try adding the AddType instruction in a .htaccess file but it didn't change a thing...
    Thanks in advance!

    OK, I've got news.
    Bad news.
    In fact I realized the appurl set in the Install badge is (obviously) not called directly but by a script located at http://adobe.com/apollo... So your my session is not available in the script that is called and that reads the actual AIR file. So I can't check wether the user requiring the file has the right to. At least, not the way I intended to do it...
    I will keep you updated if I find something!

  • CSV downloaded file cuts on the way

    Hi I'am Junji from Tokyo.
    I use 10.2.0.2.0 Oracle Database 10g Release
    and Oracle Application Server 10g Release2.
    A DB server and the Web server become another server,
    but PL/SQL on a DB server kicked with mod_plsql by a Web screen starts,
    and take out data from DB, and make a CSV file on a DB server.
    CODE:
    OWA_UTIL.MIME_HEADER('application/octet-stream', False);
    htp.print('Content-Disposition: attachment; filename=xxxxx');
    owa_util.http_header_close;
    LOOP
    htp.prn(CSV 1 line);
    LOOP END;
    It is many time good,
    but,sometime csv file was cutted.
    I don't know why.
    When the condition that this phenomenon is easy to occur pushes the save button
    after PL/SQL handling of Web side is completed,
    and the WEB screen of the client left "download (open/save/cancel) of the file" and a displayed state for around 10 minutes,
    push the "save button" ,and then, csv file is cut and shorter.
    Will this be a problem of the Web server?
    Or will it be a problem of setting such as Internet Explorer of the client?
    Thanking you in advance.

    Have you tapped on the folder in the top right corner of Pages?  This is where iTunes transfers the documents to the iPad, there is then one more step into importing them into that documents page.
    But no, Pages can only read Microsoft Word, Pages '09, or plain text files.  It can export pdfs though.
    Try importing those pdfs through iBooks.

Maybe you are looking for

  • Apache with Jsp

    Hi, Before install oracle 9i on my PC (platform 2WK). I have been installed apache and tomcat, they are work and functional on my PC. Also, I can use IE browser to open my homepage which is written by JSP. After I installed oracle 9i, when I use IE b

  • TS1599 Having issues with updating mac os x.

    the macbook shuts down intermittently. I tried to download the firmware and it says that it is not needed. The battery is completely dead. purchased a new battery and it seems like it will not charge. the charger is a steady green which means it is n

  • Canon MP560 Scanner Problems - Allow Incoming Connections and Sharing

    Though I have allowed incoming connections for my scanner, I'm prompted every time I want to scan. In addition, I've also selected so share my scanner in the Print and Fax window. However, it automatically deselects. Help! Oh, and I've also allowed i

  • Problems running Dreamweaver CS3

    Hi, i hown an Acer Aspire 8920g (Vista home premium). The problem is: when i try to run Dreamweaver CS3 (it doesn't mater if it is my licensed version or the trial version from the Adobe site), the green spash screen opens, but it stops and then cras

  • Error 3390 with Bridge CS4

    Everytime I open Bridge it unexpectedly quits. I don't know if this has anything to do with my problem, but I'm using CS4 software with my Mac OS X Lion 10.7.2