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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -