top of page

Tags

Archive

Upload File to OCI Object Storage from OIC

  • Writer: Satya
    Satya
  • Jun 20, 2021
  • 2 min read

In this Post , I will show you how to upload the file to OCI Object Storage.

Prerequisites :

1) Public & Private API keys

2) a Bucket in Object Storage

3) OIC Connection


Public key is required to add it at the user level in OCI identity . To generate one use the below commands .

Private Key

 chmod go-rwx oci_api_key_fge.pem

you have to execute this in your UNIX terminal and it will prompt to enter a passphrase . Upon entering the same a private key gets created .

Remember the Passphrase , we need this at the time of OIC connection


Provide Permissions to the private key created in previous step


chmod go-rwx oci_api_key_fge.pem

Create Public Key :


openssl rsa -pubout -in oci_api_key_fge.pem -out oci_api_key_public_fge.pem

Now got to identity > users in OCI to upload public key . This will give you the fingerprint information which will be further needed while configuring OIC connection.



ree

Click on the user name


ree

Click on API keys and add api keys .

ree

Here select paste public key . The public key we generated in the first step.

ree

Click on add and you will see the finger print gets created as shown below .


ree

Now Create a Bucket in Object Storage :

login to the OCI Console and search for object and select the same as shown below

ree

This will take to a page where you can create buckets .

Click on Create Bucket Button

ree

Enter the Bucket name and leave rest as default and click on Create Button


ree

This will create the bucket as shown below .


ree

when you click on the name , it will take you inside the bucket as shown below . it contains some important information like OCID which is required to configure the connection in OIC


ree

Now create a OIC Connection :

Login to OIC and navigate to connection and select REST adaptor


Connection url follows the below format .

https://objectstorage.TENECY-REGION.oraclecloud.com

https://objectstorage.us-ashburn-1.oraclecloud.com

ree

Tenecy OCID you will get it from below

  • Administration > Tenancy Details


ree

User OCID you get it from user details

Private key which we generated in 1st step

while generating it , i have asked to remember the Passphrase . The same has to be used here .

ree

with all these things in place , the connection is successful.


ree

lets go and create the OIC integration.

i am keeping the source file in BOX and the same file need to be uploaded to the object storage . to do this lets configure the rest adaptor wizard with our bucket name


uri- /n/{namespaceName}/b/{bucketName}/o/{objectName}

/n/idcfs9mibrtv/b/bucket-20210418-2126/o/fusio




ree

ree

in the mapping map the file reference from source to target.


ree

Final integration looks like this .


ree

Integration completed successfully .


ree

file is uploaded to object storage .

ree

Download and view the file .


ree

Happy Learning . Hope this helps.

 
 
 

Recent Posts

See All

Comments


Other Posts you may Interested 

Subscribe Form

  • facebook
  • linkedin
bottom of page