#8466: FileField.size triggering SuspiciousOperation exception ----------------------------------+----------------------------------------- Reporter: Ian Ward | Owner: nobody Status: new | Milestone: 1.0 Component: File uploads/storage | Version: SVN Keywords: FileField size | Stage: Unreviewed Has_patch: 0 | ----------------------------------+----------------------------------------- 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. -- Ticket URL: <http://code.djangoproject.com/ticket/8466> Django Code <http://code.djangoproject.com/> The web framework for perfectionists with deadlines --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
