David542
David542

Reputation: 110163

How to get name of file in request.POST?

In my request.FILES variables:

FILES
Variable    Value
script  <InMemoryUploadedFile: landing.jpg (image/jpeg)>

How would I pull the filename here in order to get "landing.jpg" ?

Upvotes: 3

Views: 5807

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798636

Via request.FILES[u'script'].name.

Upvotes: 16

Related Questions