Mike Rockett

Dispo, a simple file downloader

Recommended Posts

Mike Rockett    967

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

Share this post


Link to post
Share on other sites
pwired    954

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

Share this post


Link to post
Share on other sites
mr-fan    806

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

Share this post


Link to post
Share on other sites
Mike Rockett    967

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

Share this post


Link to post
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


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By rafaoski
      You can download and test from this address: SITE-BS4 ... And I add a screenshot:

       
    • By thetuningspoon
      Podcast Profile
      Github: https://github.com/thetuningspoon/PodcastProfile
      Direct Download: https://github.com/thetuningspoon/PodcastProfile/archive/master.zip
      Manage your podcasting with ProcessWire! The Podcast Profile is a fully featured iTunes podcast publishing platform built using nothing more than ProcessWire's basic fields/templates/pages system. Automatically generates an XML feed for submission to iTunes. 
      Fully implements the iTunes podcasting specification (https://www.apple.com/itunes/podcasts/specs.html) and supports managing an unlimited number of podcasts and episodes from the same installation. Accommodates both on-site and off-site file hosting.   Get it here: http://modules.processwire.com/modules/podcast-profile/     Instructions   1. Upload a fresh copy of ProcessWire to your server.   2. Extract the PodcastProfile-master folder from the zip file to the root directory of the new installation.    3. Rename the folder to site-PodcastProfile <- IMPORTANT!   4. Install ProcessWire as usual. When asked to select a site profile, choose "Podcast Profile".   5. Once installed, you can add a new Podcast via the "Add New" menu in the upper right portion of the admin panel.   6. Fill out the podcast details and then begin adding episodes under the podcast page, or via the "Add New" menu.   7. The XML file for each podcast is generated at http://www.yoursite.com/podcast-name/ (The url of the podcast page)   8. Use this URL to submit the podcast to iTunes at https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast


    • By joe_g
      I ran into a bug with the latest stable version of PW (2.6.1) and site profile exporter:
      I'm trying to create a distributable installation using the export profile, but in the latest version after installing selecting my exported profile the modules aren't installed. They are all there, in the modules folder. If I press "refresh" in the modules menu, all is fine; they all appear and become installed immediately. 
      I'm getting the same result exporting a profile from an older version of PW (2.5.22 dev). Importing to another old version works fine, so I'm guessing the problem lies with the importing in 2.6.1.
      Ie. 
      2.5.22 dev -> 2.5.22 dev = fine
      2.5.22 dev -> 2.6.1 = needs refresh
      2.6.1 -> 2.6.1 = needs refresh
      So the problem is with installing with an already-exported site profile, not so much the site export.
    • By Gayan Virajith
      Hi All,
      I am gladly posting my first site profile.
      Blue-VR Site Profile for ProcessWire
      Summary 
      A site profile for corporate or personal website. Profile can be used with ProcessWire open source CMS/CMF version 2.3+. The front-end uses the Bootstrap 3.1 css framework for to get the responsiveness and mobile friendliness.
      Front-end Demo - bluevr.webcreate.lk
      Back-end Demo mode - bluevr-webcreate.lk/processwire (The username 'admin' and password 'bluevr2')
      Overall features    * HTML5 & CSS3 + ({less})  * Build with bootstrap 3.1  * SEO Friendly  * Clean & modern design  * Responsive markup  * Contact form and google map locations with multiple google markers  * Testimonials using bxSlider  * AIOM supports (Just install the module no need to touch the code)   How to install   Please take a copy of the latest ProcessWire (Replace the install, modules and templates directories with those in this profile, as shown below:    - /site-default/install/ - /site-default/modules/ - /site-default/templates/    Make sure you do following steps as well    1. Add `tinymce` directory into /site-defaut.  2. Add the following two lines to your `/site/config.php` file:  $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Download   Github: https://github.com/gayanvirajith/BlueVrSiteProfile/   Credits I would like to thanks Ryan for giving us great CMS/CMF and modules. Hani AbuGhazaleh for a great module of Fieldtype: Select (AKA Drop Down) David Karich for providing such a nice module AIOM+. *** Please note that the site profile is still on testing stage.    Thanks ------------------------------------------------------------------------
      Edit: install instructions. 
      Edit: Add credits
      Edit: Update live demo url
      Edit: Update back-end demo mode details


    • By Mark
      Hi, 
      I'm currently working out PW a line at a time by pulling apart each Site Profile found in the Modules section, referring to the cheat sheet and the great help docs. Thanks Ryan, Joss, Martijn-geerts and Soma
        I would love to see more Site Profiles uploaded!  I'm being cheeky here, but are there any more users that would like to share their creations? 
      Thanks in advance.
      Sorry, I have just noticed I posted this request in the wrong section. It should of gone in the Modules/Plugins!