How to set up download from my website?

  • Thread starter aheight
  • Start date
  • Tags
    Set
In summary: How%20do%20I%20put%20a%20file%20on%20the%20web%20host%20using%20the%20file%20manager%20in%20my%20web%20hosts%20cPanel%2C%20or%20the%20%27scp%27%20command%28in%20a%20MacOS%29%29.
  • #1
aheight
321
109
Hi,
I have a website and I would like to give viewers an option for downloading a (Mathematica) file. Actually I have a blog in blogger.com which has a menu item to access an index.html file on another hosted website. I would like to store the file on the hosted website and have a button or menu item on my blog to download the file. Basically just want to give an option for viewers to run some mathematica code to help illustrate the topic in the blog. Just not sure how to accomplish this feat and I was wondering if someone could help me with this?

Thanks guys.
 
Computer science news on Phys.org
  • #2
Instructions vary depending on who is hosting your site. You should ask them.
 
  • Like
Likes QuantumQuest and aheight
  • #3
Vanadium 50 said:
Instructions vary depending on who is hosting your site. You should ask them.

Ok thanks. I did that. But in the mean time, I thought I'd try to just set it up via 'Dropbox'. I just saved the file to my dropbox, created a link, then added a menu item in my blog to access the link and it does download to my pc. Have to have Mathematica of course to run it.
 
  • #4
As V50 says, it depends on the blogging platform and on the site hosting the file. I know on Google you can add buttons to your code to get a URL reference (your URL to your file). The browser then not knowing what your file is will then ask the user if they want to download it. Alternatively the browser could have the smarts or be configured to launch mathematica in order to open and run the file.

Here's an example from the MAthematica site about their notebook technology which is probably the way to go:

https://www.wolfram.com/technologies/nb/
 
  • Like
Likes QuantumQuest and aheight
  • #5
jedishrfu said:
Here's an example from the MAthematica site about their notebook technology which is probably the way to go:

https://www.wolfram.com/technologies/nb/

Thanks, good idea. It talks about setting up a CDF file so that anyone can run the notebook without having Mathematica by using the free CDF player. That would provide greater access to my notebook.
 
Last edited by a moderator:
  • #6
The index.html file is not sufficient to set up a file download, you need access to the apache .conf files. In there, you will create an "Alias" to the url that you want to set your download to be, then point that to a specific location on your server (or network.)

For example, I have a benchmark server that both provides an interface through an index.php, as well as downloads of old results in a different location. My conf file has these lines in it.

Code:
Alias /Benchmarks "/var/www/utilities/Benchmarks"
Alias /Downloads "/mnt/datastore/Downloads"
 
  • #7
aheight said:
I would like to store the file on the hosted website and have a button or menu item on my blog to download the file.
How did you put the index.html file on the hosted website? For my website, I create/edit all files (.html, .php, whatever) on my home computer, then upload them using either the file manager in my web host's cPanel, or the 'scp' command at the command line in a MacOS Terminal window on my computer.

If I want to provide a PowerPoint presentation, for example, I simply upload the .ppt file to an appropriate location on my web host, and put a link to it on one of my pages. My browser doesn't recognize .ppt files as something it can display directly, so when I click on the link, the browser asks me where I want to download it to.
 
  • Like
Likes aheight
  • #8
jtbell said:
How did you put the index.html file on the hosted website? For my website, I create/edit all files (.html, .php, whatever) on my home computer, then upload them using either the file manager in my web host's cPanel, or the 'scp' command at the command line in a MacOS Terminal window on my computer.

If I want to provide a PowerPoint presentation, for example, I simply upload the .ppt file to an appropriate location on my web host, and put a link to it on one of my pages. My browser doesn't recognize .ppt files as something it can display directly, so when I click on the link, the browser asks me where I want to download it to.

Ok thanks, didn't realize it was as simple as that.
 
  • #9
Here is an instruction for that

 
  • Like
Likes aheight

1. How do I add a download button to my website?

There are many ways to add a download button to your website, but the most common method is to use HTML code. You can create a button using the <button> tag and add a link to your file using the <a> tag. Alternatively, you can use a third-party plugin or widget to add a download button to your site.

2. How do I make my downloads secure?

To make your downloads secure, you can use a file hosting service that offers password protection or encryption options. You can also use a content management system that allows you to restrict access to certain files based on user permissions. Additionally, you can use HTTPS encryption on your website to ensure that downloads are transmitted securely.

3. How can I track the number of downloads from my website?

To track the number of downloads from your website, you can use web analytics tools such as Google Analytics. These tools allow you to set up goals and track specific actions, such as file downloads, on your site. You can also use a file hosting service that provides download statistics and analytics.

4. Can I set up automatic downloads from my website?

Yes, you can set up automatic downloads from your website by using a download manager or a file hosting service that offers this feature. You can also use HTML code to automatically start a download when a user clicks a link or button on your site.

5. Are there any legal considerations for setting up downloads on my website?

Yes, there are several legal considerations to keep in mind when setting up downloads on your website. First, you should ensure that you have the right to distribute the files you are offering for download. You should also include a terms of use agreement and a disclaimer for any potential risks associated with downloading files from your site. Additionally, you may need to comply with copyright and intellectual property laws when offering downloads on your website.

Similar threads

Replies
7
Views
244
  • Computing and Technology
Replies
14
Views
2K
  • Computing and Technology
Replies
24
Views
7K
  • Computing and Technology
Replies
5
Views
2K
  • Programming and Computer Science
Replies
3
Views
652
  • Programming and Computer Science
Replies
3
Views
1K
  • Computing and Technology
Replies
4
Views
288
Replies
16
Views
2K
  • Programming and Computer Science
Replies
1
Views
708
  • Programming and Computer Science
Replies
15
Views
1K
Back
Top