How to create custom directory in files and save uploaded file in custom directory via using “attach” field type

In a custom doctype, I have “attach” field types to upload specific documents. I want those documents to be stored in a specific place or my given custom folder in the file manager.
we can give the custom name for the folder and that folder will create automatically. and a particular uploading file will be stored in that custom-created folder.
and finally may file path will be
for example I want to create path like this /files/properties_image/OneBHK/image0.jpg
Thank you.

1 Like