@@ -82,10 +82,10 @@ Blobs.prototype.createWriteStream = function(options, cb) {
82
82
function handleUploadResponse ( ) {
83
83
return concat ( function ( body ) {
84
84
var response = JSON . parse ( body )
85
- self . addProperty ( response . id , 'hash ' , response . md5Checksum , function ( err , resp , props ) {
85
+ self . addProperty ( response . id , 'key ' , response . md5Checksum , function ( err , resp , props ) {
86
86
if ( err ) return cb ( err )
87
87
if ( resp . statusCode > 299 ) return cb ( new Error ( JSON . stringify ( props ) ) )
88
- response . hash = response . md5Checksum
88
+ response . key = response . md5Checksum
89
89
response . size = + response . fileSize
90
90
if ( process . env [ 'DEBUG' ] ) debug ( 'createWriteStream done' , JSON . stringify ( response ) )
91
91
cb ( null , response )
@@ -115,7 +115,7 @@ Blobs.prototype.createReadStream = function(opts) {
115
115
var self = this
116
116
var duplex = duplexify ( )
117
117
debug ( 'createReadStream' , JSON . stringify ( opts ) )
118
- self . get ( opts . hash , function ( err , file ) {
118
+ self . get ( opts . key , function ( err , file ) {
119
119
if ( err ) return duplex . destroy ( err )
120
120
if ( ! file ) return duplex . destroy ( new Error ( 'Blob not found' ) )
121
121
var req = self . request ( {
@@ -130,7 +130,7 @@ Blobs.prototype.createReadStream = function(opts) {
130
130
131
131
Blobs . prototype . exists = function ( opts , cb ) {
132
132
var self = this
133
- self . get ( opts . hash , function ( err , file ) {
133
+ self . get ( opts . key , function ( err , file ) {
134
134
if ( err ) return cb ( err )
135
135
cb ( null , ! ! file )
136
136
} )
@@ -184,7 +184,7 @@ Blobs.prototype.request = function(opts, cb) {
184
184
185
185
Blobs . prototype . get = function ( hash , cb ) {
186
186
var self = this
187
- var query = "properties has { key='hash ' and value='" + hash + "' and visibility='PRIVATE' } and trashed = false"
187
+ var query = "properties has { key='key ' and value='" + hash + "' and visibility='PRIVATE' } and trashed = false"
188
188
var reqOpts = {
189
189
contentType : 'application/json' ,
190
190
query : '?' + formEncoder . encode ( { q : query } ) ,
@@ -202,7 +202,7 @@ Blobs.prototype.get = function(hash, cb) {
202
202
Blobs . prototype . remove = function ( opts , cb ) {
203
203
var self = this
204
204
205
- self . get ( opts . hash , function ( err , file ) {
205
+ self . get ( opts . key , function ( err , file ) {
206
206
if ( err ) return cb ( err )
207
207
var reqOpts = {
208
208
method : 'DELETE' ,
0 commit comments