python - Django-filer: How to create folders and save uploaded images correctly? -
the django-filer documentation makes no mention of how correctly create folder , save images savely inside.
my scenario: have different users can upload images through frontend. right every filerimage
create gets saved in unspecified folder. how create folder every user programmatically?
and how move uploaded filerimage
instance in code without violating private/public settings of file?
here solution found out through fiddling around. it possible, not prgmatic way handle this!
#import folder model filer.models.foldermodels import folder #create folder: folder = folder(owner=someuser, name="myname") #owner required folder.save() #create subfolder subfolder = folder(owner=someuser, name="subfolder", parent=folder) subfolder.save()
more onfo can gained looking inside source-code of folder model, here.
Comments
Post a Comment