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

2

1 Answer 1

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 :) }); 
1
  • Is it built in to allow this to be configured with an environment variable? Commented Jan 22, 2021 at 23:48

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.