mirror of
https://github.com/donl/slouch.git
synced 2026-05-31 06:12:20 -06:00
remove URI encoding from attachmentName
This commit is contained in:
parent
f18ad68297
commit
47dbd7768a
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ var Attachment = function (slouch) {
|
|||
Attachment.prototype.create = function (dbName, docId, attachmentName, data, contentType, rev) {
|
||||
return this._slouch._req({
|
||||
uri: this._slouch._url + '/' + encodeURIComponent(dbName) + '/' + encodeURIComponent(
|
||||
docId) + '/' + encodeURIComponent(attachmentName) + '?rev=' + encodeURIComponent(rev),
|
||||
docId) + '/' + attachmentName + '?rev=' + encodeURIComponent(rev),
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': contentType
|
||||
|
|
@ -23,7 +23,7 @@ Attachment.prototype.create = function (dbName, docId, attachmentName, data, con
|
|||
Attachment.prototype.get = function (dbName, docId, attachmentName) {
|
||||
return this._slouch._req({
|
||||
uri: this._slouch._url + '/' + encodeURIComponent(dbName) + '/' + encodeURIComponent(
|
||||
docId) + '/' + encodeURIComponent(attachmentName),
|
||||
docId) + '/' + attachmentName,
|
||||
method: 'GET',
|
||||
raw: true,
|
||||
encoding: null
|
||||
|
|
@ -35,7 +35,7 @@ Attachment.prototype.get = function (dbName, docId, attachmentName) {
|
|||
Attachment.prototype.destroy = function (dbName, docId, attachmentName, rev) {
|
||||
return this._slouch._req({
|
||||
uri: this._slouch._url + '/' + encodeURIComponent(dbName) + '/' + encodeURIComponent(
|
||||
docId) + '/' + encodeURIComponent(attachmentName),
|
||||
docId) + '/' + attachmentName,
|
||||
method: 'DELETE',
|
||||
qs: {
|
||||
rev: rev
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue