Closed btbonval closed 10 years ago
I'm seeing a problem where FilepickerFile.get_file
returns the Python file
object wrapped in a Django File
object. At that point, FilepickerFile
is not needed, but the Django File
might yet get passed around. Created ticket #25
Temporary workaround:
create a os.tmpfile
and write the contents of FilepickerFile.get_file().read()
into it. Return the os.tmpfile
object and let FilepickerFile
get garbage collected with its own temporary file.
Retrieving a file from Filepicker is written in two different places. Appears to be copy/paste.
It seems like
FPFileField.to_python
should be rewritten something like this:The
else
s in the above code are not strictly necessary.