2

From a shell, I'm trying to use the REST API for Fedora Commons to upload a binary to a particular location using curl:

curl -X PUT --upload-file image.jpg -H "Content-Type: image/jpeg" -H "http://localhost:8080/rest/TestUpload/newexcel"

The error I'm getting:

curl: no URL specified!

Following instructions from here: https://wiki.duraspace.org/display/FEDORA471/RESTful+HTTP+API

mutanthumb
  • 161
  • 1
  • 13

1 Answers1

2

-H is for extra header to include in the request when sending HTTP to a server and you should not use it before the url.

You probably need to do curl -X PUT --upload-file image.jpg -H "Content-Type: image/jpeg" http://localhost:8080/rest/TestUpload/newexcel

Dan Cantir
  • 2,915
  • 14
  • 24