* Store config fields as JSON in the db
Fewer parseInts
* Remove unnecessary parseInts
* remove some dupe code add tests
* remove console.log
* remove more parseInts
* WIP: read meta.configs defaults from defaults.json
remove more parseInts
* more work
* add log for failing test
* update admin pwd
* fix tests, dont require posts/cache before configs are initialized
* handle saves
* Test boolean conditions
* remove more parseInts
* Fix boolean values
* remove lots more parseInts
* removed json parsing
* renamed var to number
* categories dont have timestamp
* add probe image size and max image size
* replace jimp and image-probe with sharp
* better name for test
* resize with just path
* resize thumb inplace
* use filename
* Adds the filter:uploadStored hook which fires after the file is saved in the async waterfall and passes:
var storedFile = {
url: nconf.get('relative_path') + upload.url,
path: upload.path,
name: uploadedFile.name,
}
plugins.fireHook( 'filter:uploadStored', { uploadedFile: uploadedFile, storedFile: storedFile } );
* Corrections per PR. Should match style guide.
* Correction attempts take 2.
Per:
/home/travis/build/NodeBB/NodeBB/src/controllers/uploads.js
234:5 error Missing semicolon semi
235:3 error Expected indentation of 3 tabs but found 2 indent
235:19 error There should be no spaces inside this paren space-in-parens
235:105 error There should be no spaces inside this paren space-in-parens
236:3 error Expected indentation of 3 tabs but found 2 indent
* next() shouldn't fire twice, but I see no documentation suggesting that the paramaters will fire correctly.
Previous comments imply it is preferred to have fireHook fire fof the callback rather than having it happen next, so I'm wrapping next in an anonymous function to ensure it passes the parameters.
If this is not the preferred method, please provide a thorough correction.
* Meh. Figuring out this style requirement is so hit and miss.
* Corrected for proper callback? technique.
Might blow up on style. Will watch.