minio-js
minio-js copied to clipboard
uploadpart method missing parameter
` async uploadPart(partConfig: { bucketName: string objectName: string uploadID: string partNumber: number headers: RequestHeaders }) { const { bucketName, objectName, uploadID, partNumber, headers } = partConfig
const method = 'PUT'
const query = `uploadId=${uploadID}&partNumber=${partNumber}`
const requestOptions = { method, bucketName, objectName: objectName, query, headers }
const res = await this.makeRequestAsync(requestOptions)
const body = await readAsString(res)
const partRes = uploadPartParser(body)
return {
etag: sanitizeETag(partRes.ETag),
key: objectName,
part: partNumber,
}
}
`
This method should receive payload parameters ,It should be changed to the following:
async uploadPart(partConfig: { bucketName: string objectName: string uploadID: string partNumber: number headers: RequestHeaders }),paylod: Binary){ //....... const res = await this.makeRequestAsync(requestOptions,paylod) //..... }
Feel free to contribute by sending a PR/Changes with functional tests @MilkChan01 .
Also please take a look at https://github.com/minio/minio-js/pull/1325
pr : https://github.com/minio/minio-js/pull/1334
@MilkChan01 @prakashsvmx A PR related to this issue (#1334) introduced a regression with composeObject function in version 8.0.3 - as code changes dropped parsing of response body. When x-amz-copy-source: is used with multipart uploads, minio doesn't return etag in header and it's only in response body XML. Previous version relied on parsing body and this was changed with commit below:
I've opened another issue for that #1374