I have hit a roadblock using the loopback-component-storage with Amazon S3. As a test, I am trying to upload a file to S3 from my browser app, which is calling my loopback API on the backend.
My server config for datasources.json looks like:
"s3storage": {
"name": "s3storage",
"connector": "loopback-component-storage",
"provider": "amazon",
"key": “blahblah”,
"keyId": “blahblah”
},
My API endpoint is: ‘/api/Storage’
The error response I am getting from the API is as follows:
. error: {name: "MissingRequiredParameter", status: 500, message: "Missing required key 'Bucket' in params",…}
. code: "MissingRequiredParameter"
. message: "Missing required key 'Bucket' in params"
. name: "MissingRequiredParameter"
. stack: "MissingRequiredParameter: Missing required key 'Bucket' in params …”
. status: 500
. time: "2015-03-18T01:54:48.267Z"
How do i pass the {“params”: {“Bucket”: “bucket-name”}} parameter to my loopback REST API?
Please advice. Thanks much!