This is an update of the original blog updated from bootstrap 3 to use bootstrap 4 .The viewer has been removed and replaced with the above gif.
Bootstrap 4 Framework –download here.
PHP 5.6 + download here .
Downloader.php - A PHP Library (A free to use file download library created by Jack Mason )
This is included in the included Download below.
This file contains the visual element of a drop down box to select the file to download.
This file contains the visual download progress bar and button to download the file.
This file is called by the download button and processes the file to download.
This holds all the mime information and allows any type of file to be downloaded.
To show and hide classes, the class “hidden” is no longer for bootstrap 4. This is replaced with class = ”d-none” to perform the same functionality.
Setinterval() calls function progressbar() every ‘100 milliseconds’ set by the var ‘stepdelay’ until completed. This is set to run for the var ‘dcount’ times. The var ’width’ is set to 0 because we require the progressbar to finish at 0.
The function progressbar() determines when the image download and button must become visible.
We use the document.getElementById to change the different messages in the progress bar.
You can download the full code for the project at the end of the blog
Licence is MIT.
Download the code from the GITHUB repository.
June 2019Delphi A Professional VCL DBGrid Part Four
May 2019Delphi A Professional VCL DBGrid Part Three
April 2019Delphi A Professional VCL DBGrid Part Two
March 2019Delphi A Professional VCL DBGrid Part One
November 2018Delphi VCL Buttons in DBGrid
October 2018Two Helper Apps for Delphi LibUSB
September 2018Delphi Libusb Library Introduction
August 2018Delphi Object directly to a Json string in a REST Client
July 2018Delphi FMX Leaflet Plotter using OSM Maps
June 2018C2PAS32 Convertor Application
May 2018Delphi PDF Embedded viewer with PDF.js
March 2018Delphi FMX - Changing TCharacter to TCharHelper
January 2018Delphi FMX Dashboard using Chart.JS
December 2017PHP Slim REST Server & Delphi Auth Part 5
November 2017Delphi FMX REST Client App Part 4
October 2017Delphi VCL REST Pricing Client App Part 3
September 2017Delphi REST VCL Client Basic Auth Part 2B
August 2017Delphi REST Client Part 2A
July 2017PHP REST Server and Delphi Client Intro
June 2017Delphi SQLite Encryptor-Decryptor Tool
May 2017Create a Visual IP Address Geolocation with PHP
March 2017PHP Downloader using Countdown timer
January 2017Morris Charts and PHP-PDO
December 2016CSS to create a functional Toggle Button