oreilly/couchdb-guide — Issue #436: First PUT attachment command from "The Core API" not working in UNIX
Author: valberg
Created: 2011-10-12 19:27:03+00:00
State: open

When running a command similar to:

> curl -vX PUT http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689 --data-binary @artwork.jpg -H "Content-Type: image/jpg"

from http://guide.couchdb.org/draft/api.html#attachments on UNIX the following is returned:

no matches found: http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689

This is due to the way curl works. For consistency and to prevent confusion put "" around the URI:

> curl -vX PUT "http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689" --data-binary @artwork.jpg -H "Content-Type: image/jpg"