Everfighting
6/21/2017 - 6:45 AM

How can i get the file name from request.FILES?

How can i get the file name from request.FILES?

request.FILES['filename'].name


If you don't know the key, you can iterate over the files:


for filename, file in request.FILES.iteritems():
    name = request.FILES[filename].name