Creating Downloads with the Files facility


This article is an example of using the Files Option files button to upload one or more files and then directly create Downloads from the uploaded files.

The facility allows uploading multiple files so it is often useful when adding several Downloads.

It is a two stage process.  First upload the files and then create the Downloads.  Note that the target Categories for the Downloads must already exist.

The uploaded files are temporaily stored in the jDownloads root directory.

Uploading the files

Clicking on the button files  button gives the initial step as shown opposite.

This allows uploading any files that you wish to make into a Download so click on the  button upload 2  button.

files select20
Please note that the maximum size  and type of file that may be uploaded are constrained by the Options - Uploads tab 'Maximum File Size (MB)', 'Allowed Image Extensions' and 'Other allowed File Extensions'.
For more details on these setup options see the article Uploads - Options (opens in a new tab/window).

Adding files for uploading

As indicated files may either be dragged onto the panel or you can use the Add button at the bottom left.

Clicking on the button add files button will open your operating system File Manager to allow selection. Alternatively you may just drag files from the Files Manager.
files select01A
As each file is included in the panel then its name and approximate size of the file are shown.

The status is shown at  0% as they have not yet been uploaded.

Note also that the Start Upload button is now active.

files select02

Start uploading

Click on the button start upoad2  to initiate the Uploading.

Whillst the files are uploading you will see a progress bar and the amout uploaded.

As the upload is quite quick then typically a total size of say more than 4MByte is needed to actually see the progress bar and the percentage uploaded.

If it is a small total size it might be to quick to notice!
files select03

When the uploading has completed, it will indicate 100% and show the status as successfull green tick.

If you click on the button refresh  button you can upload more files.

files select04
The file is also checked for size and a valid extension.

For example if it has an invalid extension, that is one not specified in the Uploads options, then you will get an error message such as shown opposite.
invalid extension

Using FTP to Upload

To avoid any upload limit then an alternative is to use FTP to upload the file to the jdownloads folder in the Joomla root.  This folder has the top level Category folders and folders like _preview_flies, _tempzipfiles and Uncategorised.

In the example opposite FTP was used to upload a 20MB file  The actual limit set in jDownloads and php.ini was 2MB.
invalid extension

If we now  select the button files button we will be able to create the new download as describedin the Creating Downloads section below.

invalid extension

Creating the Downloads

The next step is to create the Downloads.

So clicking on the Files buttonbutton downloadswhich will show a list of files awaiting creation into a Download.
If one  of the files is not required, maybe uploaded the file by mistake, click on the small box next to the relevant file name and use the button delete  button, which is located on the view header, to remove the file from the list..  In this example the filre was deleted
files select05

The view will now be like that opposite.

Next click on one of the button create buttons.
files select06
This will open the usual backend 'Add Download' view but with a notice at the top as shown opposite


On the Files data tab you will see that the relevant file is already selected in the   'Or select file from root area' setting.

files select09

Ensure you at least give the Download a Title and that you also select the appropriate category.

When you have set all the relevant information then Save and Close as usual.

This will take you to the normal Downloads view.

files select10

To continue with the other uploaded files then click on the button filesbutton again.

files select11

Repeat the Create Downloads sequence for each of the remaining uploaded files.

ColinM March 2021 modified February 2022

Tags: index

Print Email