CulturalMe / meteor-slingshot

Upload files directly to AWS S3, Google Cloud Storage and others in meteor
MIT License
595 stars 104 forks source link

Match error: Unknown key in field temporaryCredentials #231

Open Fauphi opened 6 years ago

Fauphi commented 6 years ago

I get this error when trying to create a directive with temporary credentials. Is this functionality deprecated? (it is still in the docs)

aranair commented 6 years ago

I'm using temporary credentials and it works^ (although I'm hitting other issues)

marcusyoda commented 4 years ago

when creating the policy:

Slingshot.createDirective('directiveName', Slingshot.S3Storage.TempCredentials, {
  region: "YOURREGION",
  bucket: "YOURBUCKETNAME",
  [HERE NOT PASS AWSAccessKeyId PROP]
  temporaryCredentials: Meteor.wrapAsync(function (expire, callback) {

...put credentials in settings.json.

  "AWS":  {
    "AccessKeyId": "YOURKEYHERE",
    "SecretAccessKey": "YOURSECRETACCESSKEY"
  },

This resolves your error.

smohantyCME commented 3 years ago

Is there an updated status on this, I'm still getting the same issue. I do not have my keys in createDirective, I do have them in settings