ibm-cloud-docs / cloud-object-storage

cloud-object-storage
15 stars 46 forks source link

Unable to upload a zip file into the IBM Cloud S3 bucket #73

Closed AnishAnil closed 5 years ago

AnishAnil commented 5 years ago

Hello Team,

This one is critical for our automation and we are stuck as we dont have the correct syntax to upload a file to the bucket we created. We are trying to upload a zip file into the bucket.

Documentation being refereed: https://cloud.ibm.com/docs/services/cloud-object-storage/cli?topic=cloud-object-storage-curl#curl-put-object

curl -X "PUT" "https://(endpoint)/(bucket-name)/(object-key)" \ -H "Authorization: bearer (token)" \ -H "Content-Type: (content-type)" \ -d "(object-contents)"

We have the bearer token and i presume the object key is the actual zip file. We are unable to understand what needs to be replaced in content type and object contents.

Could you please site one with an example so we can move ahead on this issue.

Thank you

AnishAnil commented 5 years ago

curl -X "PUT" "https://s3.au-syd.cloud-object-storage.appdomain.cloud/mybucket/archive.zip" \ -H "Authorization: Bearer $COS_ADMIN_TOKEN" \ -H "Content-Type: application/zip" \ -F "file=@archive.zip"