ocPortal Tutorial: Providing downloads
Written by Chris Graham, ocProducts
{!DOC_DOWNLOADS}Table of contents
Categories
|
Adding a download category |
|
The download tree after adding our category |
This tree principle applies to many areas of ocPortal: we love to standardise things across our product to make things as consistent (hence, easy) as possible.
Download categories may have 'representative images'. When you are viewing a category with children, the representative images of the children will be shown next to the other details (if rep-images exist for them).
We understand how important it is for users to be able to navigate fast around a website, so we have created a 'view the whole download tree' feature that they may use to jump straight to the category of their choosing. The data for this tree is downloaded in a very compressed format, making it fast to load. User's may also use the unified ocPortal searching system to find downloads that match their interests.
Adding a download
|
Adding a download |
|
Do-next options are provided after adding a download, much like as is presented after managing other ocPortal content |
We recommend that you attach a file, as ocPortal can then manage it without risk of the URL being broken by something outside of the ocPortal control. There is a caveat with this, however, as the web was not designed for uploading large files. Essentially, the web was designed to make fast requests for web pages: attaching a large file extends the request, and widens the window for transfer errors (HTTP uploads have no 'resume' mechanism, and no good way of easily finding it a transfer is actually proceeding other than checking for network usage). In addition, PHP may not support large files (sometimes dropping POST information as well as the file, which makes ocPortal give an error message). Therefore we recommend not to try attaching a file more than around 10MB in size.
|
The subcategory (where our download is being stored) is displayed |
|
Our download, listed in it's category |
Important note
It is your responsibility to scan files for viruses, as ocPortal does not include a virus scanner. This is particularly relevant to those submitted for validation by users.
|
Viewing a download |
Editing/Deleting a download
|
Editing a download |
|
Deletion options are presented on the edit screen, as is the standard in ocPortal |
When deleting a download you get the option to leave the actual file on the server. This is something you will rarely want to do, as it is best to just let ocPortal manage the files inside your upload directories; however it is useful in the rare case that you added a second download to use the URL of the download about to be deleted.
ocPortal will never try to delete a file that is not inside an upload directory, and naturally it cannot delete the file at any arbitrary URL or any file for which there aren't appropriate file permissions.



