edina / nbexchange

External exchange for nbgrader
Other
6 stars 2 forks source link

Configurable upload limit for assignments and submissions #71

Closed BertR closed 3 years ago

BertR commented 3 years ago

The POST /assignment and POST /submisssion endpoints should have size limits that are user configurable.

perllaghu commented 3 years ago

user-configurable.... as in a config option across the whole service, or something settable on a per something (course?) level?

As far as I can tell, the http protocol itself as no limit - but I think I may be able to do something for tornado

perllaghu commented 3 years ago

... and is this a server limit, or a code-limit? (Do we want the server to respond with a 400: Bad Request error, or send a {"success": False, "note": "submission to big"} response back to the plugin)

BertR commented 3 years ago

I would implement this by checking the 'Content-Length' header on the request going to the POST /sumission and POST /assignment handlers. Should be configurable for the service (in nbexchange_config.py). As for the response: should be a 400 error and include an error message