DEV Community

Jiri Spac
Jiri Spac

Posted on • Edited on

sending a file with curl POST needs a magic at sign

curl -X POST -H "Content-Type: multipart/form-data" -F "file=myAwesomeFile.pdf"
Enter fullscreen mode Exit fullscreen mode

does not work. The magic part os prepending at sign in the beginning of file name.

curl -X POST -H "Content-Type: multipart/form-data" -F "file=@myAwesomeFile.pdf"
Enter fullscreen mode Exit fullscreen mode

Just in case someone struggles with this same as me.

Top comments (0)