Upload attachment using rest API

This one works. I would admit that it took me some time to get it right :smile:

curl https://demo.frappecloud.com/ -d "cmd=uploadfile&doctype=Lead&docname=LEAD-00149&filename=testfromapi.txt&filedata=aGVsbG93b3JsZAo%3D&from_form=1" -XPOST -b frappe.cookie

(file data is base64 + encoded)

4 Likes