Send file to Frappe

Hi,

the frappe docu gives me this curl to upload a picture:

curl -X POST \
https:///api/method/upload_file \
-H ‘Accept: application/json’ \
-u '‘ \
-F file=@/files/picture.png

I can´t quite figure out how to use the http-node for the last line.

Thanks for the help!

I moved the topic over from “Feature Request” to “Questions”.

The following should work like this:

Here the nodes:

Unfortunally no.
Where would i specify the upload folder in your example?

What do you mean with upload-folder?
If you mean the folder to upload the file to, then I have honestly no idea. Where is it defined in your example? Guess it would either be in the path, query- or body-parameter.
If you mean the source of the file to upload then is it in my example the first HTTP Request node that downloads the file. You can replace that with whatever you want to either read from the local hard drive (Read Binary File) or get it from another service (Dropbox, NextCloud, FTP, …).

I connected the node before to get the image. This is what the POST-node then gives me.

Ah yes sorry forgot that. You can then simply try what it says.

ahh - add Options :slight_smile: Now I have it working! Thanks a lot!

Glad to hear! Have fun!