remove double CGI escape when PUTting an attachment
Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
This commit is contained in:
parent
f16e514d52
commit
a856e98a6a
|
@ -107,7 +107,6 @@ module CouchRest
|
||||||
# PUT an attachment directly to CouchDB
|
# PUT an attachment directly to CouchDB
|
||||||
def put_attachment(doc, name, file, options = {})
|
def put_attachment(doc, name, file, options = {})
|
||||||
docid = escape_docid(doc['_id'])
|
docid = escape_docid(doc['_id'])
|
||||||
name = CGI.escape(name)
|
|
||||||
uri = url_for_attachment(doc, name)
|
uri = url_for_attachment(doc, name)
|
||||||
JSON.parse(HttpAbstraction.put(uri, file, options))
|
JSON.parse(HttpAbstraction.put(uri, file, options))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue