Upload Image Programatically

I have a web form that has multiple image attach field but doctype referenced to current webform has only one attach field but when upload image using webform there is only one image showing in corresponding doctype item so i want to write a program to add details of uploaded file to table tabfile but even if i add this details to the tabfile programatically uploaded image will not be in public/file directory. can any one please help me by point to such programs on erpnext.

You can create custom docfield of type “attach” in order to have multiple images in a single doctype. In doing so, you can access all images in record itself.

@ManasSolanki my problem is i want to add image to doctype using webform

but my doctype should only contain one attach field

like i add files to side bar

it will nice to know how attach file in the screen shot working

or

i have 3 file upload button in web form but my doctype of this webform has only one attach field

so when i click submit of webform i want to add image to public/file folder also i want to add details to tabel tabFile so that file uploaded via webform will show on side bar with out adding changing structure of current doctype

1 Like