piece_demandeur = request.FILES['piece']
fs = FileSystemStorage(location='media/demande-upload/')
filename = fs.save(piece_demandeur.name, piece_demandeur)
Hi,
I use this code in my views for uploading file with a model form. It works correctly But I would like to know how to rename and decrease size file (if file is greater than 200 Ko) before uploading.
I need your help.