IV1T3 / django-middleware-fileuploadvalidation

A Django middleware to validate user file uploads and detect malicious content.
Apache License 2.0
6 stars 2 forks source link

Support multiple upload forms with different restrictions #5

Closed IV1T3 closed 2 years ago

IV1T3 commented 3 years ago

Currently, upload restrictions can only be applied application-wide. The middleware should be able to differentiate between multiple upload forms and their designated usage to allow a variety of upload forms with different upload restrictions.

Django decorators could provide a suitable solution, since they could be used to notify the middleware which restrictions to apply. If no decorator was supplied, a default restriction set should be applied as a fallback option.

IV1T3 commented 2 years ago

Look into process_view() and view_func

IV1T3 commented 2 years ago

Closed with commit 58b0f938e0f34f4b5b93bd6eabc8b4cb11540128