Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploadpart method missing parameter #1333

Open
MilkChan01 opened this issue Aug 14, 2024 · 3 comments
Open

uploadpart method missing parameter #1333

MilkChan01 opened this issue Aug 14, 2024 · 3 comments

Comments

@MilkChan01
Copy link

`
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) //..... }

@prakashsvmx
Copy link
Member

Feel free to contribute by sending a PR/Changes with functional tests @MilkChan01 .

@prakashsvmx
Copy link
Member

Also please take a look at #1325

@MilkChan01
Copy link
Author

MilkChan01 commented Aug 14, 2024

pr : #1334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants