FileField path url dumpdata/loaddata issue
|Reported by:||Ian Ward||Owned by:||nobody|
|Severity:||Keywords:||FileField path url|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a model that includes a FileField with values such as "/media/uploaded/YEAR/MONTH/NAME" (upload_to='%Y/%m').
I upgraded to Django 1.0 beta svn-8457 and switched from using get_filefiledname_size() to filefiedname.size.
Now, this property triggers a SuspiciousOperation exception: When django.core.files.storage.FileSystemStorage.path is called,
it calls safe_join and decides that the leading slash in the file path puts the file outside of the media root directory.
New instances of this model include a leading slash in the path, so this doesn't seem to be a change
to how the file name is stored.
Change History (4)
comment:1 Changed 8 years ago by
|Component:||File uploads/storage → Serialization|
|Keywords:||path url added; size removed|
|Summary:||FileField.size triggering SuspiciousOperation exception → FileField path url dumpdata/loaddata issue|