IBM / ibmcloud-cos-cli

13 stars 11 forks source link

Upload a directory using ibmcloud cli #3

Closed prasad-1729 closed 4 years ago

prasad-1729 commented 4 years ago

Hi

Is there any way to upload a directory(multiple files) to COS directly from local? Help me this... I can see the aspera will work...it work only in systems... If servers like jenkins....this aspera wont work..I guess..

Thanks!!

wbhuberIBM commented 4 years ago

@prasad-1729 - currently, there are no commands in COS Plugin (ibmcloud cos) that support uploading a directory with multiple files to COS directly from a local machine. For now, you can create a bash script that recursively puts object to the bucket using the CLI from inside a directory. Each loop will pick up the object name in the directory and tag it as the key for the put-object command.

In the script iterating through files inside a directory: ibm-cloud cos put-object --bucket <bucket_name> --key <object_name>

To support uploading a directory using Linux-style commands, we are internally tracking here: CSAFE-71331