upload_to vs FileSystemStorage

2010-09-08 Thread Dave
Hi everyone, I've found in documentation usage of custom file storage. There it is like that ( http://docs.djangoproject.com/en/1.2/topics/files/#the-built-in-filesystem-storage-class ) - from django.db import models from django.core.files.storage import FileSystemStorage fs = FileSystemStorage

Re: upload_to vs FileSystemStorage

2010-09-09 Thread Preston Holmes
On Sep 8, 5:04 am, Dave wrote: > Hi everyone, > > I've found in documentation usage of custom file storage. There it is > like that > (http://docs.djangoproject.com/en/1.2/topics/files/#the-built-in-files... > ) - > > from django.db import models > from django.core.files.storage import FileSyst

Re: upload_to vs FileSystemStorage

2010-10-04 Thread Stodge
If I do upload_to=os.sep, I get an error: Attempted access to '/test.pdf' denied. It's trying to upload to the root of the drive! settings.DOCUMENT_STORE_PATH is something like /var/www/testproject/ documents file = models.FileField(storage=FileSystemStorage(location=settings.DOCUMENT_STORE_PAT