I have a piece of code which gets a file from a form via POST.
file = request.FILES[\'f\']
What would be the simplest way of saving this fi
You can use django FileField, it support specify a upload_to parameter, like this:
FileField
upload_to
data_file = models.FileField(upload_to=content_path)
Where content_path can be a string or a function which returns a string.
content_path