Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do you allow visitors to download from site?

    Hi,

    I am a new web developer and I was wondering if anybody could point me in the right direction. I want to allow my visitors to download a word or pdf doc. How do I do this?

    Thanks so much,

    Murw

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,537
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    You put your .pdf or .doc file in a directory on your webspace and
    give them a link like this:

    http://www.croponline.com/uploads/clips.pdf

    Code:
    <a href="http://www.croponline.com/uploads/clips.pdf">CROP Clips (.pdf 185K)</a>
    In this example, the .pdf file called "clips.pdf" is located in a folder called "uploads".

    Their browser asks them if they want to open the file or save it to disk.

    When offering a file like this, it's always a good idea to let them know ahead of time what type of file it is, and how big it is (before they click on the link).

  • #3
    New to the CF scene
    Join Date
    Nov 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you mlseim

    Thanks for the help. One more question does that send a download popup to the user asking if they would like to download, or does it just happen automatically when they click the link.

    Thanks again,
    Murw

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    If the browser can't open it, it will prompt them with a download dialog box. But in instances like with PDFs, if they have the proper software plug-in installed to view it in their browser, it will usually just automatically open it up.
    OracleGuy

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,537
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Oracleguy is right ...

    but I'm trying to think if you might have the option with
    different systems like Windows XP vs Windows 98, 2000, etc.

    And maybe browsers may determine that also ... the option to
    prompt before opening or downloading or to open without a prompt.

    It's no big deal though ... people usually expect that and like the
    idea of having the choice.

  • #6
    Regular Coder
    Join Date
    Oct 2005
    Location
    NYgamers.net
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's all governed by how the mime types and helper applications are setup on the client pc. So in theory it could be different for everyone. Welcome to our world ;D

  • #7
    New Coder
    Join Date
    Nov 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    downloading a file

    Quote Originally Posted by mlseim
    You put your .pdf or .doc file in a directory on your webspace and
    give them a link like this:

    http://www.croponline.com/uploads/clips.pdf

    Code:
    <a href="http://www.croponline.com/uploads/clips.pdf">CROP Clips (.pdf 185K)</a>
    In this example, the .pdf file called "clips.pdf" is located in a folder called "uploads".

    Their browser asks them if they want to open the file or save it to disk.

    When offering a file like this, it's always a good idea to let them know ahead of time what type of file it is, and how big it is (before they click on the link).

    Hello,

    Your thread as a reference.

    Once I save the file in a directory on my webspace. Do I have to put my server online 24/7 so they can download the file from my website.

    Can you please explain to me the process of downloading a file on a website. Like for example an ebook, or a software.

    How can i save the file on my webspace? Do I need a software to save the file or software on my website?

    Thank you.

    dummy_1

  • #8
    New Coder
    Join Date
    Oct 2005
    Location
    Near some trees
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your server should be online all the time anyway, there is not much you can do about that. It makes no difference whether you PC is switched on or not... Unless you are hosting your site from your PC

    All you need to do is upload the file to your server. Then create a link on your web page that goes to that file. If you are uploading a picture... Say pic1.jpg, then you might upload that to ftp.yoursite.com/images. The file location will be www.yoursite.com/images/pic1.jpg

    The code to go on your webpage is right here....
    Code:
    <a href="http://www.yoursite.com/images/pic1.jpg">CLICK HERE TO SEE PIC1</a>

    This Part of the code above is where the user will be taken if they click
    Code:
    <a href="http://www.yoursite.com/images/pic1.jpg"></a>
    this part of the code above is what will be displayed on their screen as a buton
    Code:
    <a href="http://www.yoursite.com/images/pic1.jpg">CLICK HERE TO DOWNLOAD PIC1</a>
    About the first post in this thread... Do a Google search for Microsoft Word Viewer. Instead of downloading files your users can read then directly from your webpages.

  • #9
    New Coder
    Join Date
    Oct 2005
    Location
    Near some trees
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your server should be online all the time anyway, there is not much you can do about that. It makes no difference whether you PC is switched on or not... Unless you are hosting your site from your PC

    All you need to do is upload the file to your server. Then create a link on your web page that goes to that file. If you are uploading a picture... Say pic1.jpg, then you might upload that to ftp.yoursite.com/images. The file location will be www.yoursite.com/images/pic1.jpg

    The code to go on your webpage is right here....
    Code:
    <a href="http://www.yoursite.com/images/pic1.jpg">CLICK HERE TO SEE PIC1</a>

    This Part of the code above is where the user will be taken if they click
    Code:
    <a href="http://www.yoursite.com/images/pic1.jpg"></a>
    This part of the code above is what will be displayed on their screen as a buton
    Code:
    CLICK HERE TO SEE PIC1
    About the first post in this thread... Do a Google search for Microsoft Word Viewer. Instead of downloading files your users can read then directly from your webpages.


  •  

    Posting Permissions

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