From outside the cluster, it is possible to access the buckets and the contained files through HTTP(s) clients such the BucketFS Explorer or cURL™. You only have to use one of the database servers' IP addresses, the specified port and the bucket name, and adjust your internal firewall configuration.
BucketFS Explorer is a graphical tool, which you can use to browse and manage buckets and files in buckets. This tool is written in Java and can run on Windows, Mac, and Linux. You can access the BucketFS Explorer from our GitHub repository.
Using this tool you can:
- Create / Delete / Modify BucketFS services
- Create / Delete / Modify buckets
- List files of a bucket
- Upload / Download / Delete files
- Display additional metadata (for example, size of a bucket, path to refer to bucket in a UDF)
- Drag and Drop files from your local file system
For information on how to use this tool, refer to the Getting Started section in the GitHub repository.
In the following example the HTTP client cURL is used to list the existing buckets, upload the files file1 and tar1.tgz into the bucket bucket1 and finally display the list of contained files in this bucket. The relevant parameters for our example are the port of the BucketFS (1234), the name of the bucket (bucket1) and the passwords (readpw and writepw).
If the bucket is not public readable, then you can only access this bucket using the user's r and w passwords configured.
Using cURL, you can list all the existing buckets in the database. The following example shows you how to list existing buckets. The parameters in the example are the read password (readpw) for the user, the database server IP address (192.168.6.75), and the port number (1234) for BucketFS.
Add and View Files in Buckets
You can add files into BucketFS using the PUT option. The following examples show how to upload the files - file1 and tar1.tgz into the bucket - bucket1, and display the list of contained files in this bucket. The relevant parameters for our example are the port of the BucketFS (1234), the name of the bucket (bucket1) and the passwords (readpw and writepw).
$> curl -X PUT -T file1 http://w:email@example.com:1234/bucket1/file1
$> curl -X PUT -T tar1.tgz \
$> curl http://r:firstname.lastname@example.org:1234/bucket1
Additionally, you can also use the GET option to view the contents of the file available in a bucket.
Delete Files from Buckets
You can delete files that are no longer needed by using the DELETE option. The following example shows how to delete file1 from the bucket. The relevant parameters for our example are the port of the BucketFS (1234), the name of the bucket (bucket1) and the passwords (writepw).