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 · 5 comments
Open

uploadpart method missing parameter #1333

MilkChan01 opened this issue Aug 14, 2024 · 5 comments

Comments

@MilkChan01
Copy link
Contributor

`
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
Contributor Author

MilkChan01 commented Aug 14, 2024

pr : #1334

@SPodjasek
Copy link

@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:

40724aad4f917a0f1b70e8af73175382fdfab854

@SPodjasek
Copy link

I've opened another issue for that #1374

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

3 participants