How do I get a File Download dialog window to pop up?

Discussion in 'HTML' started by Graham Stow, Jan 13, 2007.

  1. Graham Stow

    Graham Stow Guest

    I have set up a 'downloads' directory on a website, but when I fire up the
    browser and click on the files in it, they open within the browser itself.
    How do I get the 'File Download - Do you want to open or save this file?'
    dialog window to pop up, giving the user the choice of running the file or
    saving it? I've fiddled around with the permissions of both the directory
    and the files themselves, but can't find a setting that works - either the
    user's permission is denied or the file opens in the browser.
     
    Graham Stow, Jan 13, 2007
    #1
    1. Advertising

  2. Graham Stow

    J.O. Aho Guest

    Graham Stow wrote:
    > I have set up a 'downloads' directory on a website, but when I fire up the
    > browser and click on the files in it, they open within the browser itself.
    > How do I get the 'File Download - Do you want to open or save this file?'
    > dialog window to pop up, giving the user the choice of running the file or
    > saving it? I've fiddled around with the permissions of both the directory
    > and the files themselves, but can't find a setting that works - either the
    > user's permission is denied or the file opens in the browser.


    Some browsers are broken and need a false mime-type to download a file, so you
    need to fiddle with the mime-types on the server, so it sends the "right" type
    depending on what file you are serving.

    If you are using a good webserver then go to alt.apache.configuration to get
    some help, even if it's a bit off topic I'm sure they will help you.

    If you are using a crappy one, then call up microsoft support for help.

    --

    //Aho
     
    J.O. Aho, Jan 13, 2007
    #2
    1. Advertising

  3. ..oO(J.O. Aho)

    >Graham Stow wrote:
    >> I have set up a 'downloads' directory on a website, but when I fire up the
    >> browser and click on the files in it, they open within the browser itself.
    >> How do I get the 'File Download - Do you want to open or save this file?'
    >> dialog window to pop up, giving the user the choice of running the file or
    >> saving it? I've fiddled around with the permissions of both the directory
    >> and the files themselves, but can't find a setting that works - either the
    >> user's permission is denied or the file opens in the browser.

    >
    >Some browsers are broken and need a false mime-type to download a file


    Huh? Every browser allows to download files. It's just broken scripts
    that try to "force" downloads where you have to use a false mime type
    or the generic application/octet-stream.

    >, so you
    >need to fiddle with the mime-types on the server, so it sends the "right" type
    >depending on what file you are serving.


    Files should be sent with the correct mime type, so it's left up to the
    user/browser to decide what to do with them.

    Micha
     
    Michael Fesser, Jan 13, 2007
    #3
  4. Graham Stow

    Graham Stow Guest

    This seems to be a browser problem. I was using IE 6.0 when I reported this
    problem. In Opera v9.01 the dialog box opens every time. Anyone aware of a
    fix for IE?
     
    Graham Stow, Jan 13, 2007
    #4
  5. Graham Stow wrote:
    > I have set up a 'downloads' directory on a website, but when I fire up the
    > browser and click on the files in it, they open within the browser itself.
    > How do I get the 'File Download - Do you want to open or save this file?'
    > dialog window to pop up, giving the user the choice of running the file or
    > saving it? I've fiddled around with the permissions of both the directory
    > and the files themselves, but can't find a setting that works - either the
    > user's permission is denied or the file opens in the browser.
    >


    Because your looking in the wrong place. Not a server setting, but a
    browser setting. It is how *your* browser is set to handle targeted file
    type. As a web designer, your really do not have control over how your
    visitors' browsers are setup, so stop trying. For example if they use IE
    and have it set to open Word documents in their browser rather than
    download (unwise IMHO) so be it! Their choice.

    Don't futz with your server's mime settings to falsely identify files of
    the wrong type in attempts to *force* downloads that has been suggested.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 13, 2007
    #5
  6. Graham Stow

    Roy A. Guest

    Graham Stow skrev:
    > I have set up a 'downloads' directory on a website, but when I fire up the
    > browser and click on the files in it, they open within the browser itself.
    > How do I get the 'File Download - Do you want to open or save this file?'
    > dialog window to pop up, giving the user the choice of running the file or
    > saving it? I've fiddled around with the permissions of both the directory
    > and the files themselves, but can't find a setting that works - either the
    > user's permission is denied or the file opens in the browser.


    The browsers let users decide how to handel files of diffrent types.
    You shouln't change the MIME type just to force a download. What you
    proberly should do is to serve the files in the downloads directory as
    an attachment.

    At the web server you couldt ad a Content-Disposition HTTP header for
    the downloads directory with the value attachment. If you're not using
    a graphical user interface, the syntax is "Content-Disposition:
    attachment;".
     
    Roy A., Jan 13, 2007
    #6
  7. Graham Stow wrote:
    > This seems to be a browser problem. I was using IE 6.0 when I reported this
    > problem. In Opera v9.01 the dialog box opens every time. Anyone aware of a
    > fix for IE?
    > File
    >


    Okay, we'll try this again. The problem is *you* made a choice somewhere
    along the line to open the file type in question (you have supplied
    that bit of info) to open in the browser window instead of download and
    your cleared the open to prompt to not ask again. So to fix this, do this.

    For sake of demonstration, lets say that you have accidentally set IE to
    open rather than download MS Word documents.

    Open "My Computer" with Windows Explorer, yep remember IE is *really*
    the file management tool Windows Explorer.

    From the menu go to "Tools|Folder Options...|File Types"

    Scroll and select "DOC Microsoft Word Document"

    Click the "Advanced" button

    Select options:
    Confirm open after download
    Always show extension (* I recommend this see rant below)

    and clear option
    Browse in same window

    *
    <rant>

    You should *always* show file extensions on Windows machines! Especially
    where Windows uses the extension decide how to handle a file (and where
    it is an executable!) Never understood be Mr Bill felt that the last 3
    letters after the period would be *way too confusing* for the public to
    handle where that are so important to his OS and that an picture (icon)
    would be better?! So he sets "Hide file extensions for known types"
    enabled by default!

    Where is the harm you say?

    Okay take two files, "Readme.txt" "TrashYourSystem.exe". Now when your
    make "TrashYourSystem.exe" give the executable the icon of a Notepad
    document. Now rename "TrashYourSystem.exe" to "Readme.exe"!

    Guess what "Readme.txt" and "Readme.exe" look like when "Hide file
    extensions for known types" is enabled?

    Windows security starts with good practices and I feel MS hasn't got a
    clue at times!

    </rant>


    Whew...

    Sorry just had to clear off another friend's infected computer recently...



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 13, 2007
    #7
  8. Graham Stow

    Roy A. Guest

    Jonathan N. Little skrev:
    > Graham Stow wrote:
    > > This seems to be a browser problem. I was using IE 6.0 when I reported this
    > > problem. In Opera v9.01 the dialog box opens every time. Anyone aware of a
    > > fix for IE?
    > > File
    > >

    >
    > Okay, we'll try this again. The problem is *you* made a choice somewhere
    > along the line to open the file type in question (you have supplied
    > that bit of info) to open in the browser window instead of download and
    > your cleared the open to prompt to not ask again.


    Well, since the OP have suppied that bit of info I can't argue with
    you. I whish only whish he could supply it to me too.
     
    Roy A., Jan 13, 2007
    #8
  9. Graham Stow

    Roy A. Guest

    Jonathan N. Little skrev:
    > Graham Stow wrote:
    > > This seems to be a browser problem. I was using IE 6.0 when I reported this
    > > problem. In Opera v9.01 the dialog box opens every time. Anyone aware of a
    > > fix for IE?
    > > File
    > >

    >
    > Okay, we'll try this again. The problem is *you* made a choice somewhere
    > along the line to open the file type in question (you have supplied
    > that bit of info) to open in the browser window instead of download and
    > your cleared the open to prompt to not ask again.


    Well, since the OP have supplied that bit of info I can't argue with
    you. I only whish he could supply it to me too.
     
    Roy A., Jan 13, 2007
    #9
  10. Roy A. wrote:
    > Jonathan N. Little skrev:
    >> Graham Stow wrote:
    >>> This seems to be a browser problem. I was using IE 6.0 when I reported this
    >>> problem. In Opera v9.01 the dialog box opens every time. Anyone aware of a
    >>> fix for IE?
    >>> File
    >>>

    >> Okay, we'll try this again. The problem is *you* made a choice somewhere
    >> along the line to open the file type in question (you have supplied
    >> that bit of info) to open in the browser window instead of download and
    >> your cleared the open to prompt to not ask again.

    >
    > Well, since the OP have suppied that bit of info I can't argue with
    > you. I whish only whish he could supply it to me too.
    >

    ??? May comments were directed to OP (OP == "you") in my comments,
    (Unless you == Graham Stow)

    My error was I am missing a word, should have read "(you have *not*
    supplied that bit of info)" with respect to what file type the OP has
    opening in his browser instead of downloading.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 13, 2007
    #10
  11. Graham Stow

    Graham Stow Guest

    > Okay, we'll try this again. The problem is *you* made a choice somewhere
    > along the line to open the file type in question (you have supplied that
    > bit of info) to open in the browser window instead of download and your
    > cleared the open to prompt to not ask again.

    Very clearly explained, Jonathan. Apologies for being so dense.
    Many thanks,
    Graham
     
    Graham Stow, Jan 13, 2007
    #11
  12. Jonathan N. Little wrote:
    Argh! Either too few or too Many letters!

    > ??? May comments were directed to OP (OP == "you") in my comments,


    *My* comments were directed to OP (OP == "you") in my comments, ...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 13, 2007
    #12
  13. Graham Stow

    Jeff Bowman Guest

    "Jonathan N. Little" <> wrote in message
    news:7b61f$45a92af6$40cba7b4$...

    > <rant [/]>


    That's a pretty good rant, Jonathan :)



    --
    We're losing America. To see how you can help
    get her back, visit www.FreedomToFascism.com.




    --
    Posted via a free Usenet account from http://www.teranews.com
     
    Jeff Bowman, Jan 14, 2007
    #13
  14. Graham Stow wrote:
    >> Okay, we'll try this again. The problem is *you* made a choice somewhere
    >> along the line to open the file type in question (you have supplied that
    >> bit of info) to open in the browser window instead of download and your
    >> cleared the open to prompt to not ask again.

    > Very clearly explained, Jonathan. Apologies for being so dense.
    > Many thanks,


    No problem. My main tirade was really directed to Mr. Gates. I have to
    admit finding the setting for IE is not intuitive. You would think MS
    would have added access to it while Explorer is in "Internet" mode since
    the setting directly effects how files should be handled while
    surfing... Personally I do not use the POS except for testing...and file
    management.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 14, 2007
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Cardoso
    Replies:
    1
    Views:
    781
    Daniel Cardoso
    Sep 24, 2004
  2. Sam --
    Replies:
    2
    Views:
    617
    Sam --
    Mar 17, 2005
  3. Kumar Saurav

    How to pop up a Download Window

    Kumar Saurav, Jan 25, 2009, in forum: Ruby
    Replies:
    2
    Views:
    128
    Richard Conroy
    Jan 27, 2009
  4. Replies:
    3
    Views:
    535
  5. Madame Blablavatsky
    Replies:
    8
    Views:
    173
    Dr John Stockton
    Sep 16, 2005
Loading...

Share This Page