Using Cyberduck to access Oracle Cloud Infrastructure Object Storage

## Why Cyberduck

Due to the upload file size limitation of browsers, if we need to upload a file whose size is bigger than 4GB, then we cannot make it done through the browser directly. 

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/24dee3e3-a09d-4919-b755-9ad02a5004bd.png)

Occasionally, we need to upload a big file (> 4GB) to OCI Object Storage. Although we can install and use `oci-cli` (OCI Command Line Interface) to perform the upload, since `oci-cli` is a command line tool, the installation process and user interface is not quite user friendly for most of the users who do not have technical background. 

[Cyberduck](https://cyberduck.io/) is GUI tool which can connect to most of the cloud storage services, as long as the service provides Amazon S3 compatible API. It is suitable for us who prefer GUI and have requirement of uploading big files to the object storage.

Brief introduction quotes from Cyberduck official site.

> Cyberduck is a libre server and cloud storage browser for Mac and Windows with support for FTP, SFTP, WebDAV, Amazon S3, OpenStack Swift, Backblaze B2, Microsoft Azure & OneDrive, Google Drive and Dropbox.

## Install Cyberduck

Visit the [Cyberduck download page](https://cyberduck.io/download/) and select your platform to download the installation package.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/88f15f7b-5cfc-8ff2-c310-964221f94f1f.png)

Once the download is completed, we can install it as you do of any other softwares. There should be no any problem in this step.

## Create Customer Secret key

OCI Object Storage provides Amazon S3 compatible API, but to access this API we need to use the generated key pair `Access Key` and `Secret Key`. This key pair is associated with your OCI account, and you can generate the secret key with following steps.

Visit your OCI account profile

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/0fdc561f-8bff-4636-c4e8-828289bd9961.png)

Click `Customer Secret Keys`

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/314eb3e5-c475-576f-885b-3ec261140fac.png)

Click `Generate Secret Key`, input a name for the key and click the button.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/190ce420-0662-47a3-8108-44d88aa03c3b.png)

Once the key is generated, click `Copy` and save it to some safe place. As the message says, this secret key will not show again. if you don't make a note of it, you will have to delete it and re-generate it.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/bab5b028-66e3-01c3-cc1a-f0a15d06f360.png)

You could get the `Access Key` from the web console.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/314eb3e5-c475-576f-885b-3ec261140fac.png)

Now you should have both of the Access Key and the Secret Key.

## Configure the Cyberduck profile

Cyberduck provides some connection profile for OCI Object Storage, just visit and download the Cyberduck connection profile from the [Connecting to OCI Object Storage](https://trac.cyberduck.io/wiki/help/en/howto/oraclecloud) page. In this example, I select [​OCI Object Storage (ap-tokyo-1).cyberduckprofile](https://svn.cyberduck.io/trunk/profiles/OCI%20Object%20Storage%20(ap-tokyo-1).cyberduckprofile)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/e1b7ab7e-413c-816c-75f8-9946856109bd.png)

Double click the downloaded file and the installed Cyberduck should open automatically on MacOS, if you are using Windows, you may need to edit the bookmark manually.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/3a1e05a8-2478-156b-ac87-0ab66780c5d8.png)

Edit the Nickname as you wish and replace the `<namespace>` part of Server field with the namespace you get from the OCI Object Storage console page as shown below.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/cd41e4b2-5328-36a9-3cb5-667a5cd44484.png)

Get namespace from the OCI Object Storage console page.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/dfc523f6-ed7d-b191-6972-71f55bcc4d6c.png)

Paste the generated `Access Key` into the Access Key field. Then save and close this profile. In the Cyberduck bookmark window, you should get a new bookmark as below image shows.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/fa92cd3d-e9d2-c2da-4eab-e8664cb66333.png)

## Perform the upload

Double click this bookmark there should be window pop up and ask for the Secret Key, just paste the generated `Secret Key` and click Login.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/c40d4835-d11b-ac83-27d8-04c797628eaa.png)

After authenticating all the buckets in your compartment should be listed.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/720719ed-2b4d-848b-b9c0-c49f10853f6f.png)

Double click the bucket name you want to upload, drag and drop the file (20 GiB) into the bucket. Then you can have a cup of coffee to wait the upload to complete.


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/b9f9e919-8645-9880-ee9a-ec2624ab7d1f.png)

After a while, the file is uploaded successfully.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/ce7a140f-2272-8485-6998-40ea19fd2f48.png)

Now, you can also see it from the OCI Object Storage console.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/100411/1fa666f2-e8ff-8935-456c-d7cd5d6ad5b4.png)

## Reference

- [Cyberduck download](https://cyberduck.io/download/)
- [Connecting to OCI Object Storage](https://trac.cyberduck.io/wiki/help/en/howto/oraclecloud)
- [To create a Customer Secret key](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/managingcredentials.htm#To4)
- [File Size Limits for Uploads through Web Browsers](https://www.smartfile.com/blog/file-size-limits-for-uploads-through-web-browsers/)