These are chat archives for reactioncommerce/reaction

22nd
Feb 2018
zzh1234567
@zzh1234567
Feb 22 2018 13:34
how to implement upload any file type with CollectionFS? @zenweasel any prompt ? thanku
Michael Jenny
@prinzdezibel
Feb 22 2018 14:14
@zzh1234567 I think you can set the content-type on the File object and insert it. Something like that: https://github.com/reactioncommerce/reaction-swag-shop/blob/b93df34ce9a14ff2c9a4e737a73854f4b65897f7/server/methods.js#L131-L143
CollectionFS should pick that up when the appropriate filter is matched: https://github.com/reactioncommerce/reaction/blob/ac07d02a971797863d0f593fc4608dd4b0a2611c/lib/collections/collectionFS.js#L90-L94
Loan Laux
@loanlaux
Feb 22 2018 16:11
Could anyone here guide me about adding custom fields to the ProductSearch record? Reading the source code of search-mongo, I understood that I'll have to specify my custom fields in settings.private.products.includes, inside my custom search plugin's register.js. Is that correct? If so, is this feature documented anywhere?
I'm referring to line 78 of /imports/plugins/included/search-mongo/server/methods/searchcollections.js