Some more background -
If you look at lines 228 to 230 of django/db/models/fields/files.py,
you'll see that the generate_filename method is overwritten by your
upload_to method if you specify one.
228 self.upload_to = upload_to
229 if callable(upload_to):
230
I have a custom file storage working with a specific subdir structure.
Did you pass in a method specifying the path in the upload_to kwarg
for FileField?
Here's my model code, where EnhancedFileSystemStorage is my custom
file storage class, and get_random_dir_name is just a helper method
that doe
Hi,
I've written a custom Storage that uses WebDAV as its underlying
engine. When I save a file '/foo/bar/file.ext', I want it to be saved
under /foo/bar in the webdav filesystem. However, it seems that
FileField overrides the directory structure:
def generate_filename(self, instance, filen
3 matches
Mail list logo