﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34441	A new require_files decorator for file validation in Django Framework	Raza Ul Mustafa	nobody	"I am interested in adding a new decorator in Django. This decorator will be used for file validation purposes.

This decorator checks the file extensions and size. If the file extensions and size provided by the developer are not in the request.FILES then it will raise errors. In this way, developers don't need to modify their functions to check the file validations.

For example,
{{{
@require_files([""pdf"", ""txt"", 20])
def file_upload_view(request):
    return HttpResposne(""Successful"")
}}}
Here this decorator will check if the file types are (pdf or txt) else will raise TypeError.  Also, check if each file size is less than 20 MB. If not, will raise IOError.

I had already started working on this decorator and had written multiple tests. So the functionality is almost implemented.
This feature is useful for improving the security and reliability of file uploads in the project, as it prevents users from uploading files that may cause server issues or contain malicious content."	New feature	closed	File uploads/storage	4.1	Normal	wontfix	decorator		Unreviewed	0	0	0	0	0	0
