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.
![](https://static.wixstatic.com/media/672833_cab9221c38d54c0a82daa0018ba338e8~mv2.png/v1/fill/w_980,h_323,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_cab9221c38d54c0a82daa0018ba338e8~mv2.png)
Click on the user name
![](https://static.wixstatic.com/media/672833_402e965348854c1d95fcfb65b1973a0d~mv2.png/v1/fill/w_980,h_320,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_402e965348854c1d95fcfb65b1973a0d~mv2.png)
Click on API keys and add api keys .
![](https://static.wixstatic.com/media/672833_65306752a00149dab780a322a945c0e6~mv2.png/v1/fill/w_980,h_212,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_65306752a00149dab780a322a945c0e6~mv2.png)
Here select paste public key . The public key we generated in the first step.
![](https://static.wixstatic.com/media/672833_ad3e99c845e04e1fa1458983f4400bc0~mv2.png/v1/fill/w_980,h_381,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_ad3e99c845e04e1fa1458983f4400bc0~mv2.png)
Click on add and you will see the finger print gets created as shown below .
![](https://static.wixstatic.com/media/672833_ca04af6279c74556af2516f96b62e0bf~mv2.png/v1/fill/w_980,h_288,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_ca04af6279c74556af2516f96b62e0bf~mv2.png)
Now Create a Bucket in Object Storage :
login to the OCI Console and search for object and select the same as shown below
![](https://static.wixstatic.com/media/672833_e399abed98784f93ac75d9b72e983192~mv2.png/v1/fill/w_980,h_147,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_e399abed98784f93ac75d9b72e983192~mv2.png)
This will take to a page where you can create buckets .
Click on Create Bucket Button
![](https://static.wixstatic.com/media/672833_ea0bd79888464b1a9aa3c74b39fb1d13~mv2.png/v1/fill/w_980,h_193,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_ea0bd79888464b1a9aa3c74b39fb1d13~mv2.png)
Enter the Bucket name and leave rest as default and click on Create Button
![](https://static.wixstatic.com/media/672833_b893511e5c1849f1b285ff7af8a4f872~mv2.png/v1/fill/w_980,h_340,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_b893511e5c1849f1b285ff7af8a4f872~mv2.png)
This will create the bucket as shown below .
![](https://static.wixstatic.com/media/672833_460e6d826829482496d2f3abbb1fbad6~mv2.png/v1/fill/w_980,h_317,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_460e6d826829482496d2f3abbb1fbad6~mv2.png)
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
![](https://static.wixstatic.com/media/672833_37c65553efbf48d1b6bbd56c244f9cd6~mv2.png/v1/fill/w_980,h_331,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_37c65553efbf48d1b6bbd56c244f9cd6~mv2.png)
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
![](https://static.wixstatic.com/media/672833_e665b408f5f14e848e564e98c72c77c0~mv2.png/v1/fill/w_980,h_373,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_e665b408f5f14e848e564e98c72c77c0~mv2.png)
Tenecy OCID you will get it from below
Administration > Tenancy Details
![](https://static.wixstatic.com/media/672833_0851fef5782f48d386371d551e8ed847~mv2.png/v1/fill/w_980,h_335,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_0851fef5782f48d386371d551e8ed847~mv2.png)
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 .
![](https://static.wixstatic.com/media/672833_242734b24c024fbb871ae98faa70ac23~mv2.png/v1/fill/w_980,h_321,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_242734b24c024fbb871ae98faa70ac23~mv2.png)
with all these things in place , the connection is successful.
![](https://static.wixstatic.com/media/672833_4e892d422ce049f5a37b15d64fdf96b5~mv2.png/v1/fill/w_980,h_205,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_4e892d422ce049f5a37b15d64fdf96b5~mv2.png)
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
![](https://static.wixstatic.com/media/672833_5a29ffd33a244aebbb5f97e4e7cf1ce3~mv2.png/v1/fill/w_836,h_510,al_c,q_90,enc_avif,quality_auto/672833_5a29ffd33a244aebbb5f97e4e7cf1ce3~mv2.png)
![](https://static.wixstatic.com/media/672833_790c08dc9fb444afa916e3710d5531e7~mv2.png/v1/fill/w_818,h_423,al_c,q_85,enc_avif,quality_auto/672833_790c08dc9fb444afa916e3710d5531e7~mv2.png)
in the mapping map the file reference from source to target.
![](https://static.wixstatic.com/media/672833_aeb8310991124f78a7477697fc21a070~mv2.png/v1/fill/w_980,h_342,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_aeb8310991124f78a7477697fc21a070~mv2.png)
Final integration looks like this .
![](https://static.wixstatic.com/media/672833_aa731fb07dc54e429ecd5412672fee14~mv2.png/v1/fill/w_980,h_212,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_aa731fb07dc54e429ecd5412672fee14~mv2.png)
Integration completed successfully .
![](https://static.wixstatic.com/media/672833_d8816a9afcbe48b1bb88ca7df7b7aa1e~mv2.png/v1/fill/w_980,h_256,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_d8816a9afcbe48b1bb88ca7df7b7aa1e~mv2.png)
file is uploaded to object storage .
![](https://static.wixstatic.com/media/672833_ae54a61f2fdf419d806fc0c4a624a0b7~mv2.png/v1/fill/w_980,h_217,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_ae54a61f2fdf419d806fc0c4a624a0b7~mv2.png)
Download and view the file .
![](https://static.wixstatic.com/media/672833_f7b1b7a6942a47b2a069ec4432ee9474~mv2.png/v1/fill/w_980,h_355,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/672833_f7b1b7a6942a47b2a069ec4432ee9474~mv2.png)
Happy Learning . Hope this helps.
تعليقات