DEV Community

Jiri Spac
Jiri Spac

Posted on • Edited on

1

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)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay