You can access the buckets and the contained files from outside the cluster by using an HTTPS client such as curl. You only need to provide one of the database servers' IP addresses, the BucketFS port, the bucket name, and the required read/write passwords. You may also have to adjust your internal firewall configuration as needed.
In the following examples the HTTPS client curl is used to list the existing buckets on a server, upload the files file1 and tar1.tgz into the bucket bucket1, display a list of the files in the bucket, and delete one of the files.
The relevant parameters in these examples are the database server IP address (192.168.6.75), the BucketFS port (1234), the name of the bucket (bucket1), and the
w user passwords (readpw and writepw).
If the bucket is not public readable, you can only access it using the configured
The following example shows how to list all existing buckets on the server.
Add Files to Buckets
To add files to a bucket in BucketFS, use the PUT option. The following example shows how to upload the files file1 and tar1.tgz into the bucket bucket1.
$> curl -X PUT -T file1 https://w:email@example.com:1234/bucket1/
$> curl -X PUT -T tar1.tgz https://w:firstname.lastname@example.org:1234/bucket1/
If you do not append a filename to the upload path, curl will write the file to the bucket/folder using the original filename. The path must then end with a trailing / (forward slash). If you want the file to be stored in the bucket under a different name, append the new filename to the path. For example:
View Files in Buckets
To view a list of the files in a bucket, use the curl command with the path to the bucket. For example:
To view the contents of a specific file in a bucket, use the GET option.
Delete Files from Buckets
To delete files from a bucket, use the DELETE option. The following example shows how to delete the file
file1 from the bucket