1

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

stambata
  • 1,598
  • 3
  • 13
  • 18
user3676224
  • 113
  • 5
  • I'd guess tweaking this would do it: https://github.com/ParsePlatform/parse-server/blob/ab06055369efee1e456dfdf5c3a86ceba0f4faf1/src/ParseServer.js `maxUploadSize = '20mb',` – ceejayoz Jun 28 '16 at 15:25
  • any idea where would that be on the parse-server-example project? i would like to go from there and edit it if possible. [parse-server-example](https://github.com/ParsePlatform/parse-server-example) – user3676224 Jun 28 '16 at 15:36

1 Answers1

2

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