Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Make a file downloadable?


  • Please log in to reply
5 replies to this topic

#1 RB_Kandy

RB_Kandy

  • Members
  • 141 posts
  • OFFLINE
  •  
  • Local time:12:04 AM

Posted 24 October 2012 - 03:41 PM

I need to add a few files to my website where I can hand out a link, and when the user clicks it, their browser asks if they would like to download the file.
I tried just sticking the file on the site, but when I go to it, my browser wants to open the file with the browser, and not give me a "Open With" or "save to" popup.

BC AdBot (Login to Remove)

 


#2 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,716 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:12:04 AM

Posted 24 October 2012 - 03:47 PM

Why kind of file is it?

#3 RB_Kandy

RB_Kandy
  • Topic Starter

  • Members
  • 141 posts
  • OFFLINE
  •  
  • Local time:12:04 AM

Posted 24 October 2012 - 04:18 PM

Currently I've only tried this with a .PDF
Do you suppose archiving to rar or zip would work?

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:04 PM

Posted 24 October 2012 - 05:52 PM

Without seeing your code, it is impossible to say. It would also help to know how you are trying to do this; are you hitting a script on the server to facilitate the download, or just trying to use your browser. I have a snip of PHP code that works fine, but if you are not using php, it won't help you much.

#5 RB_Kandy

RB_Kandy
  • Topic Starter

  • Members
  • 141 posts
  • OFFLINE
  •  
  • Local time:12:04 AM

Posted 24 October 2012 - 06:10 PM

uploading it as rar fixed the problem.

groovicus, I was just uploading it using filezila, some free FTP client. And placing the file in under the public_html folder. So the directory would be www.mywebsite.com/depot/file.pdf

But as I said, saving it as RAR fixed this problem. So it's all good.

#6 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:04 PM

Posted 24 October 2012 - 07:02 PM

That would be because of the mime type. As long as it works, and your end users know how to deal with rar files.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users