This article describes how to use our AS3 Cloud File Manager extension.
The installation package is called pkg_as3manager.zip, you upload and install it as normal using the Joomla installer. It will install a component and two plugins. These plugins, called AS3, and AS3 Downloads, should be automatically enabled: if not, you can do this through the Joomla plugin manager.
In order to manage your buckets and objects you will need to connect to your AWS account. For this you need a set of IAM credentials. Make sure that your credentials give you sufficient permission to view and create Amazon S3 buckets and objects. There is more on this here: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html
Once you have your keys, in your Joomla admin go to AS3 Manager->Admin. Click on the "Edit Amazon S3 Keys" tab, copy and paste in your keys.
Once you have done this, you can check if you are connected to Amazon S3 by clicking the 'View Buckets' link. If all is set up correctly, you should see any buckets that you have already created.
Click the 'View Buckets' link to access the buckets manager. From here you can create new buckets, using the 'New' button, or delete existing buckets. Amazon have some restrictions on bucket names, they may consist of lower case letters, numbers and hyphens. See http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html .
Note that Amazon may cache the list of buckets available, so you may continue to see a bucket listed after you have deleted it: there is nothing wrong if this happens, it will eventually be removed.
Once you have some buckets you can view, upload or delete objects in them by clicking on the bucket name, this will take you to the objects view.
In order to connect to your Dropbox account you will need to create a Dropbox app and connect it to your Joomla site.
To create the app, go to https://www.dropbox.com/developers and log in to your account. Click the "My Apps" menu item. You will see a button called "Create App", click it. Select the API which should be "Dropbox". Select "App Folder" for the type of access, and give the app a name, then click "create app".
Now you will see the app listed. Click on it, to edit the settings. Actually you can leave them alone in most cases. You can leave the app in development status and yourself as the only user. If you have more than one client that you are making websites for you can use the same app and increase the number of users.
The app now has permission to access files in a particular folder in a connected Dropbox account. This folder will be automatically be created in a parent folder called "Apps" and given the name listed under "App folder name" - you can change this name if you want in the settings. At this point it is worth opening up your dropbox account in another browser tab, and opening the folder, and uploading a few files so that you have something to see when you connect the app to your Joomla site.
Now you are ready to connect this app to your Joomla site. It is easiest to keep the app page open, and in a new browser tab open your Joomla admin, go to Components->AS3 Cloud File Manager. Click on the "Edit Dropbox Keys" tab. You actually have two choices here for connecting:-
1. In your App dashboard there is a button labelled "Generate" under the heading "Generated access token", you can click the button, then copy and paste the generated token in the "Dropbox Token" field in the Joomla AS3 Manager admin. Then click save. You should then see a notice saying that you are connected to Dropbox.
2. Alternatively you can copy and paste the app key and secret key into the AS3 Manager admin, then save. You should see a button labelled "Go to Dropbox". Click this button, you will be taken to a Dropbox page giving you a code to authorise the app. Allow it, then copy and paste the generated code into the "Dropbox Code" field in the AS3 Manager admin. When you click save, you should see a message saying that your token is stored.
As you can see, the second method of connecting is slightly more complicated, but can be a bit simpler in the longer term, and is probably recommended if you are creating a site for a client, because once the app keys are stored, if they ever need to re-authorise the app (eg if it seems like the access token has been stolen) then this can be done without needing to access the app itself.
Either way, you should now be connected to Dropbox. If you click the "Dropbox Files" menu item in your Joomla admin, you should see your files.
You can use AS3 Manager purely as a simple way to manage your Amazon S3 buckets and objects, or your Dropbox files from your Joomla admin, however you may want to make some of them available for download, either for sale using our plugin for Virtuemart., or as a download available to a specific Joomla user group, or a free download.
To do this you need to create download files and packages. Note that the files themselves remain hosted on your cloud host, by creating a download you are creating a matching record in Joomla which allows you to control access to the file.
A package is a group of one or more files: if you want to make several files available, or want the flexibility to change some of the files over time (for example if you release a new version), it makes sense to group the files into a package. Packages can be assigned to categories, and you can control access to all the files in the package by controlling access to the package itself.
Creating a Download Package
AS3 Manager requires download packages to be assigned to a category, so the first step is to create a category for them, by clicking on the "Categories" menu item in the AS3 Manager admin, then click the "New" button. This brings up the category editor which operates in exactly the same way as for a Joomla articles category. You can give the category a title such as "Downloads", and then click save to create it.
Now we you can create your first download package, by clicking on the "View Download Packages", then clicking the "New" button in the AS3 Manager admin. This opens the package editor, where you can set various options for the package, although if you are in a hurry the only thing that you really must set is the title.
There are some other options that it is useful to understand.
Code: This is used to generate a download link for the package. Usually it is a good idea to leave this blank, if you do so then a random value will be generated for you, but if you want to set a specific code here you can.
Is Free: This field controls whether the package will ever be downloadable from the front end of your site. If you are planning to sell the package then it is a good idea to leave this value as 'no'. You will need an additional extension to handle files for sale, such as our plugin for Virtuemart. If you want the package to be freely available, or downloadable to a particular Joomla group (such as on a subscription site), then set this to 'yes'.
The extension supports the normal Joomla ACL and publishing options for packages, so you can also set these in the package editor.
Once you have set the package options, remember to save it. Then you should see it listed.
Creating a Download File
Now you have created a package it is time to add some files to it.
The quickest way to create download files is to use AS3 Manager to navigate to the Dropbox or Amazon S3 files that you want to import as downloads, select them, and click the "Create Downloads" button.
You will see a form which allows you to set some options for the files (see below for an explanation of the options), then click "Save and Close" to complete the download creation. Note that the files themselves remain hosted on your cloud host, by creating a download you are creating a matching record in Joomla which allows you to control access to the file.
Alternatively you can create a download using this method. Click the view files link next to the package listing, or go to AS3 Manager->Files, and click the 'New' Button. This method is slower than automatically importing the files, but allows you to set more options. For example you can give the download a name - this is what users will see, instead of the file name.
Select a source for the file, which will be either Amazon S3 or Dropbox. Then click on the 'file details' tab, and click the 'select' button to select an Amazon S3 object, or a Dropbox file.This brings up a file browser. Find the file that you want, and click its name to select it.
That is all that you need to do, you can now click the save button.
There are some other fields that it is useful to understand.
Code: This is used to generate a download link for the file. Usually it is a good idea to leave this blank, if you do so then a random value will be generated for you.
Is Free: This field controls whether the file will ever be downloadable from the front end of your site. If you are planning to sell the file then it is a good idea to leave this value as 'no'. You will need an additional extension to handle files for sale, such as our plugin for Virtuemart. If you want the file to be freely available, or downloadable to a particular Joomla group (such as on a subscription site), then set this to 'yes'.
The download file obeys the normal rules for Joomla access: it can be unpublished, or restricted to a particular user group.
The AS3 manager package includes two plugins: the as3 content plugin allows you to embed download files and packages in your Joomla content using a simple shortcode; the as3downloads plugin creates an editor button that lets you browse for available downloads, and will automatically add the shortcode for you.