I am trying to upload a file to my parse server(using javascript sdk), but I need to make sure i can upload up to 500MB (for example).

Is it possoible to be done in parse-server ? Can it be edited in some config file?

Thank you

As you mentioned you use parse-server-example.

So you will open index.js and in this code

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
  }
});

You will keep all your code same but you will add a last line

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 :)
});

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.