Open MilkChan01 opened 3 months ago
` 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
` async uploadPart(partConfig: { bucketName: string objectName: string uploadID: string partNumber: number headers: RequestHeaders }) { const { bucketName, objectName, uploadID, partNumber, headers } = partConfig
}
`
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) //..... }