Code

Ticket #7675: uploaded_file_fix.diff

File uploaded_file_fix.diff, 536 bytes (added by apollo13, 6 years ago)
Line 
1diff --git a/django/core/files/uploadedfile.py b/django/core/files/uploadedfile.py
2index 9287a1b..7f515f9 100644
3--- a/django/core/files/uploadedfile.py
4+++ b/django/core/files/uploadedfile.py
5@@ -193,7 +193,7 @@ class TemporaryUploadedFile(UploadedFile):
6         """
7         Returns the full path of this file.
8         """
9-        return self.name
10+        return self._file.name
11     
12     # Most methods on this object get proxied to NamedTemporaryFile.
13     # We can't directly subclass because NamedTemporaryFile is actually a