Jump to content

Dispo, a simple file downloader


Mike Rockett
 Share

Recommended Posts

A client recently asked me to make a simple utility that they could use to upload files for public downloads. One of the requirements, for some reason or the other, was clean URIs. Thought it best to do it with PW. Too much of a mission anywhere else, really.
 
Called it Dispo, which comes from Content-Disposition. Sharing in case anyone else may find it useful.
 
This is generally for use on a subdomain - client wants it installed at files.example.com.
 
In config.php, there are two options to set: one for the domain of the main website (Dispo will redirect there when the home page or 404 is hit), and the other for the name the company or, whatever. Best to set these as they default to localhost and ABC & Co., respectively.
 
Create files using the downloader template, specifying a title for the file (this, along with the company name as set in config.php, will be used for the downloaded file name).

When the entry (Page) is requested, its file will be downloaded. To view the file instead (if the browser is capable of it), add ?view to the URL.
 
post-2289-0-88411900-1436983482.png

Download below:

site-dispo.zip

  • Like 8
Link to comment
Share on other sites

When the entry (Page) is requested, its file will be downloaded. To view the file instead (if the browser is capable of it), add ?view to the URL.

This is just great and shows the endless ways of "everything is a page".

  • Like 1
Link to comment
Share on other sites

Thank you for this.

Is it  on Github.

Little note:  If you underscore and colorize something or some words you force me to click on it until a new window opens...if this behavior dosn't work you stealing my "clicks" ..... :lol: 

Best regards mr-fan

  • Like 1
Link to comment
Share on other sites

Thank you for this.

Is it  on Github.

You're welcome. It isn't on GitHub - I don't really have plans to make many changes. If I land up expanding on it, I'll push it to GH.

Little note:  If you underscore and colorize something or some words you force me to click on it until a new window opens...if this behavior dosn't work you stealing my "clicks" ..... :lol:

Too true - I shall no longer reduce the lifespan of your mouse. ;)

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...