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

How to pass partIndex to QuerySignHTTP for WriteMultipart? #726

Closed
JinnyYi opened this issue Aug 26, 2021 · 3 comments
Closed

How to pass partIndex to QuerySignHTTP for WriteMultipart? #726

JinnyYi opened this issue Aug 26, 2021 · 3 comments

Comments

@JinnyYi
Copy link
Contributor

JinnyYi commented Aug 26, 2021

s3 supports presigned for multipart uplaod. For the current QuerySignHTTP, seems there is no suitable way to pass in partIndex parameter:

func (s *Storage) QuerySignHTTP(op string, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) {}

Alternative Way

Add index system pair then use pairs.WithIndex() to pass in partIndex for WriteMultipart.

Drawback

All similar operations need to add extra pairs.

@Xuanwo
Copy link
Contributor

Xuanwo commented Aug 27, 2021

Discussion happened at https://matrix.to/#/#beyondstorage@gsp-706:matrix.org

@Xuanwo
Copy link
Contributor

Xuanwo commented Aug 31, 2021

Hi, @JinnyYi , can you migrate this discussion to https://forum.beyondstorage.io?

BeyondStorage
The forum for Beyond Storage

@JinnyYi
Copy link
Contributor Author

JinnyYi commented Aug 31, 2021

Hi, @JinnyYi , can you migrate this discussion to https://forum.beyondstorage.io?

Moved to https://forum.beyondstorage.io/t/how-to-pass-partindex-into-querysignhttp-for-writemultipart/192.

BeyondStorage
The forum for Beyond Storage
BeyondStorage
Migrated from How to pass partIndex to QuerySignHTTP for WriteMultipart? Given code like this: type HTTPSigner interface { QuerySignHTTP(op string, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error) } When using QuerySignHTTP for WriteMultipart in s3, seems there is no suitable way to pass in partIndex parameter as no global pair or system pair for it. func (s *Storage) querySignHTTP(ctx context.Context, op string, path string, expire time.Duration, opt pa...

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