File Manager issues while uploading file

Hi,

I want to store the files , attachment in specific folder whether it’s is public or private
folders should be created in assets folder while adding doctype record , but when I am attaching file while creating record, neither file manager prompting for in which folder I want to store the file nor it’s creating folder when I am creating folder using file manager doctype, when I am creating folder using file manager and doing cut file from Home directory to other folder like Products, it’s showing that path of directory in mariadb database as Home/Products but no directory created in asset folder, what I want is , whenever new product created and if I am attaching file to products doctype it should create new folder for each product , because each product can have multiple images example : for products PD-0001 file should be stored in Home/Product/PD-0001 and so on with each products

please any reply

is any one knows the solution?

Hi @nadirshaikh:

Frappe file manager don’t work this way. All files are stored “physically” on public/private folder (depending your choose at uploading), under your site directory. Each file attachment creates a document on File Doctype, connected to the Doctype and the specific document …

You could change this implementation, using file management hooks.
https://frappeframework.com/docs/user/en/python-api/hooks#file-hooks

Hope this helps.