Thanks for your response. Figured that out earlier. I was somewhat trying to make it a dynamic module to be exported and used elsewhere in the code. I can see that you have hard-coded AWS config in it's adapter itself which is ofc not the best of practices, and now if you want to take it out of there and pass in from the module itself. How would you recommend doing that?!
To be honest, I made this solution in a hurry. You know, I start thinking about making a library MulterCropper.
You are right about hard-coded config, This solution sucks, As for me the best way is to take it out and pass via a constructor.
Couldn't get it running. How to export the UploadImageFactory to a module?
Hi, You can do it like below:
Thanks for your response. Figured that out earlier. I was somewhat trying to make it a dynamic module to be exported and used elsewhere in the code. I can see that you have hard-coded AWS config in it's adapter itself which is ofc not the best of practices, and now if you want to take it out of there and pass in from the module itself. How would you recommend doing that?!
To be honest, I made this solution in a hurry. You know, I start thinking about making a library
MulterCropper
.You are right about hard-coded config, This solution sucks, As for me the best way is to take it out and pass via a constructor.
It really helped me to say the least. Thank you. That's a nice idea for a library though.