How to set up download from my website?

  • Thread starter Thread starter aheight
  • Start date Start date
  • Tags Tags
    Set
Click For Summary
SUMMARY

This discussion focuses on setting up file downloads from a website, specifically for Mathematica files hosted on a separate server. Users can utilize Dropbox to create download links or configure their web server's Apache configuration files to set up aliases for file downloads. The conversation highlights the importance of understanding the hosting environment and the use of CDF files to enhance accessibility for users without Mathematica. Key tools mentioned include Dropbox, Apache configuration, and Mathematica's CDF technology.

PREREQUISITES
  • Understanding of Apache configuration files and how to create aliases
  • Familiarity with Dropbox for file hosting and sharing
  • Basic knowledge of HTML for adding download links
  • Awareness of Mathematica and its CDF technology for file accessibility
NEXT STEPS
  • Learn how to configure Apache .conf files for file downloads
  • Explore Mathematica's CDF technology and its implementation
  • Research methods for creating download links in HTML
  • Investigate file hosting options beyond Dropbox for better integration
USEFUL FOR

Web developers, bloggers, educators using Mathematica, and anyone looking to implement file downloads on their websites.

aheight
Messages
318
Reaction score
108
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
Instructions vary depending on who is hosting your site. You should ask them.
 
  • Like
Likes QuantumQuest and aheight
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.
 
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
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:
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"
 
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
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.
 
Here is an instruction for that

 
  • Like
Likes aheight

Similar threads

Replies
7
Views
3K
Replies
2
Views
876
Replies
16
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 24 ·
Replies
24
Views
10K
Replies
3
Views
1K
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K