Skip to content

Commit

Permalink
Update object-uploader.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shruthied authored Jan 4, 2018
1 parent d18e90a commit eead7ee
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/object-uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as querystring from 'querystring'
export default class ObjectUploader extends Transform {
constructor(client, bucketName, objectName, partSize, contentType, callback) {
super()
this.emptyStream=true;
this.emptyStream=true
this.client = client
this.bucketName = bucketName
this.objectName = objectName
Expand Down Expand Up @@ -58,7 +58,7 @@ export default class ObjectUploader extends Transform {
}

_transform(chunk, encoding, callback) {
this.emptyStream=false;
this.emptyStream=false
let method = 'PUT'
let headers = {
'Content-Length': chunk.length,
Expand Down Expand Up @@ -208,12 +208,12 @@ export default class ObjectUploader extends Transform {
}

_flush(callback) {
if (this.emptyStream) {
let method = 'PUT'
let headers = {
'Content-Length': 0,
'Content-Type': this.contentType
}
if (this.emptyStream) {
let method = 'PUT'
let headers = {
'Content-Length': 0,
'Content-Type': this.contentType
}
let options = {
method, headers,
query: '',
Expand Down Expand Up @@ -263,6 +263,6 @@ export default class ObjectUploader extends Transform {

callback()
})
}
}
}
}

0 comments on commit eead7ee

Please sign in to comment.