-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass arguments createDirective #71
Labels
Comments
the createDirective function takes two arguments: |
Okay this is what I got var guid = guid();
var uploader = new Slingshot.Upload('fileUploads', { guid: guid });
uploader.send(file, function(error, downloadUrl) { And then I have my directive Slingshot.createDirective('fileUploads', Slingshot.S3Storage, {
bucket: Meteor.settings.S3Bucket,
region: Meteor.settings.AWSRegion,
acl: 'public-read', But I am not sure how to access the guid I passed in, inside the directive |
Your key and authorize functions in the directive will take it as their 2nd argument. key: function (fileInfo, metaInfo) {
console.log(metaInfo.guid);
} |
I see, thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to pass arguments to the createDirective function, so that one can use such when creating the key/filename?
The text was updated successfully, but these errors were encountered: