In createDirective(), the use of _defaults() causes the baseConfigs object gets maxSize and allowedFileTypes written to it, so when I use baseConfigs in the 2nd createDirective() call, those (wrong) values are in baseConfigs, but _defaults() usage also causes the 2nd call to createDirective() not to overwrite the maxSize and allowedFileTypes, so the targetUploader directive ends up getting the same restrictions as the imageUploader.
I'm creating two different directives that differ only in their restrictions, so I do this:
In createDirective(), the use of _defaults() causes the baseConfigs object gets maxSize and allowedFileTypes written to it, so when I use baseConfigs in the 2nd createDirective() call, those (wrong) values are in baseConfigs, but _defaults() usage also causes the 2nd call to createDirective() not to overwrite the maxSize and allowedFileTypes, so the targetUploader directive ends up getting the same restrictions as the imageUploader.