New Example – Downloading File

3. June 2009 – 10:19

Hi all,

I’ve just uploaded new example of how to invoke “Save As..” dialog when downloading files from the server.

http://examples.extjs.eu

Enjoy!


StumbleUpon Toolbar
  1. 9 Responses to “New Example – Downloading File”

  2. Saki, This was great timing. I used this in conjunction with your grid actions extension as well and it works great. I originally had it so it opened the file in the browser and it was not what I really wanted to do.

    Do you know of where I can get a listing of the header content-types? I have found what I need so far for the majority of my use cases (pdf, doc, xls).

    By Ryan on Jun 15, 2009

  3. Perfect! I’m glad it works for you.

    Try to search RFCs for content-types.

    By Saki on Jun 18, 2009

  4. I know your example php script is dumbed down, but you might want to mention that a real implementation will probably wish to use readfile or fpassthru functions to write to the output buffer. Both of these stream the file contents out instead of loading the whole file content into memory. Can help in cases where your server has memory usage limits but you want to be able to serve very large files through PHP.

    http://us2.php.net/manual/en/function.readfile.php

    There are also lots of other things to potentially consider like handling conditional GET requests, configuring your HTTP server (usually apache) for gzip / deflate transfer encoding and Byte Range support (for file download resumes).

    By donovan on Jul 22, 2009

  5. ext learn

    By huangjunjie on Jul 29, 2009

  6. Is there a way to submit form in this example with params ?
    Just adding params property to form doesn\’t help here.

    By Kirill on Dec 13, 2009

  7. I need functionality that will call DirectJNgine methods to download some files. It would be like I want to download some blob in a DB and I make DirectJNgine calls to get the blob (or bits), but how do I get these downloaded to the browser. These examples use hidden frames and forms, but call some PHP to get the bytes. I need to call java methods WITH parameters via DirectJNgine. Can this be done?

    By JT on Jul 14, 2011

  8. Please send me article on file sharing

    By Martin on Oct 6, 2011

  9. Sir,
    Can u please tell me how to do the download using Ext JS and Java.Using Jasper report i have created a pdf file in tomcat,i am lloking forward to download that pdf file download to client machine.Please help me sir

    By Manjush on Oct 23, 2011

  10. Hi,
    in my case sometime the download request sometimes returns an error message (well formed json) instead of the requested file. Could you show how to catch this error message?

    Many thanks.
    SWK

    By SunWuKung on Oct 28, 2011

Post a Comment