These are chat archives for Automattic/mongoose

11th
Feb 2019
Ghost
@ghost~5c60c2b5d73408ce4fb768de
Feb 11 00:34
Anyone have few pointers about storing images from a client browser on a web server? Seems like a jungle of different approaches out there, whats the highest performance one?
Paul "Joey" Clark
@joeytwiddle
Feb 11 14:34
@zEverdeen For acceptable performance, use a buffer field in MongoDB.
For better performance, store the image in a file (not in the DB) then serve those files with something dedicated like nginx.
For the best performance, upload the image to an AWS bucket or some other hoster, and let them serve it.
Jeff Allen
@jeffallen6767
Feb 11 15:35
I have a situation where I'd like to transform a couple integer types on my documents when reading/writing, is there a succinct way to specify this on the schema using pre/post hooks? somthing else? or am I thinking about this the wrong way? -- I have data in the wild that is incorrect, and I'd like to correct it when reading, and writing...