CulturalMe / meteor-slingshot

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

Create Directives Dynamically? #235

Open merlinstardust opened 6 years ago

merlinstardust commented 6 years ago

Is it possible to create directives dynamically?

I am creating a bucket for each user and so I need to create a directive for each user's bucket.

jamesgibson14 commented 4 years ago

I have successfully implemented this. I am storing the settings in a mongo collection, then I pass them into a function that creates a new directive. If something changes in the settings I just need to run delete Slingshot._directives[directiveName] and then create it again.