I got an error: \"The number of GET/POST parameters exceeded settings.DATA_UPLOAD_MAX_NUMBER_FIELDS\".
Error says that TooManyFieldsSent at /api/upload
.
This happened when I tried posting a huge list values to Backend. In my case I had the liberty of sending the list as a string, and it worked. Django by default has this check to prevent Suspicious activity(SuspiciousOperation
).
However below setting will also work.
# to disable the check
DATA_UPLOAD_MAX_NUMBER_FIELDS = None
You can set this to None to disable the check. Applications that are expected to receive an unusually large number of form fields should tune this setting.
From Django official documentation. https://docs.djangoproject.com/en/3.1/ref/settings/#data-upload-max-number-fields