sails-mongo

Sails Js File uploads. file uploaded successfully but text params are missing while

五迷三道 提交于 2021-02-11 12:10:49
问题 I am using sails js. I am trying to upload an array of files and create record for each file in mongodb. In db, I will be storing filename. i am uploading PDF files here. But as the size increases to 1 MB, The file is geeting uploaded but the text fields from the HTML end are missing. If the files size is reduced, then everything is going smooth. Where am I going wrong? Can someone help me. var f= req.file('ifile') f.upload({dirname:'../../assets/images/logs'}, function whenDone(err, files) {

Sailsjs. Best way to create (and manage) indexes on sails-mongo (mongodb)

隐身守侯 提交于 2020-01-24 15:54:25
问题 I was using sailsjs 0.12. It supported index attributes on models , also i was using npm package Sails-hooks-mongoat to create inverse indexes and so. It wasn't ideal, but it worked. Right now they dropped the index attribute and mongoat is currently unsafe and pending updates to work on Sails.js 1.0. I would like to know the best approach to: Create Indexes on new deployments. Migrate (ensure?) indexes on deployment updates. 回答1: Since you are not allowed to run 'migrate: alter' in