我试图上传一个文件到我的分析服务器(使用javascript sdk),但我需要确保我可以上传高达500MB(例如)。
在parsing服务器中完成是否可行? 它可以在一些configuration文件中编辑?
谢谢
正如你所提到的,你使用parse-server-example。
所以你会打开index.js和这个代码
var api = new ParseServer({ databaseURI: databaseUri || 'mongodb://localhost:27017/dev', cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js', appId: process.env.APP_ID || 'myAppId', masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret! serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed liveQuery: { classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions } });
你会保持所有的代码相同,但你会添加最后一行
var api = new ParseServer({ .......... liveQuery: { classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions }, //dont forget to add the coma after the last bracket maxUploadSize: "500mb" //you will now have 500mb limit :) });