Services

BigTree supports Amazon S3, Rackspace Cloud Files, and Google Cloud Storage. Each of these can be configured in the Cloud Storage section of the Developer tab. While you can only have one default set for storage, you can add credentials for all three services and use them through the BigTreeCloudStorage class.

Handling Uploads

By default, all content uploaded by your users is stored on the local server in /site/ under the folder you dictate in your forms or template. The BigTreeStorage class facilitates this storage through its store, replace, and delete methods. If you've setup a cloud storage preference, BigTreeStorage handles uploading, deleting, and replacing files on the remote cloud storage platform instead of your local platform. For this reason, when handling file uploads in your front end templates you should use BigTreeStorage's store method to ensure that you receive a unique file name and that the upload is stored in the proper place. BigTreeStorage also ensures that dangerous file types are not uploaded (exe,com,bat,php,rb,py,cgi,pl,sh,asp,aspx).

Working Directly With Cloud Storage

The BigTreeCloudStorage class allows you to work directly with multiple cloud storage vendors. You can instantiate the class with "rackspace", "google", or "amazon" to choose which of your configured cloud storage vendors to use. There are wrapper methods around each common function (like listing buckets/containers, getting the contents of a bucket/container, etc). If you wish to call the Amazon or Rackspace APIs directly you can use the callAmazonS3 or callRackspace methods. Calling Google directly can be done via cURL using the Authorization Bearer header and the token stored in Settings["token"].

Each service requires their calls to be done differently, so keep that in mind when calling the APIs directly.