-
Notifications
You must be signed in to change notification settings - Fork 57
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
Allow generate signed url for upload objects #646
Comments
Maybe we can provide a higher-level abstraction for those operations? Something like |
Reach
but for write
query sign is rarely used except for |
How about add API like: (maybe type Accessor interface {
Access(op, path string, pairs...) (req *http.Request, err error)
} Or type Accessor interface {
AccessRead(path string, pairs...) (req *http.Request, err error)
AccessWrite(path string, pairs...) (req *http.Request, err error)
} |
We can implement it as most object support For
From simplicity, maybe we can just support |
Our users have a need to support the generation of a signed URL that allows their end-users to upload/download the corresponding data directly. Operations that they need include: (take S3 as an example)
|
Hi, I camp up a new idea that, we can define a new interface like: type HttpSinger interface {
QuerySignHttp(req *http.Request, ps ...types.Pair) (signedReq *http.Request, url string, err error)
// HeaderSignHttp(req *http.Request, ps ...types.Pair) (signedReq *http.Request, auth string, err error)
} For now, This interface can deprecated |
As external methods are provided for obtaining signed URL for most services, maybe the parameter
How about one of the following methods:
|
req, err := store.QuerySignHttp(types.OpRead, "abc")
req, err := store.QuerySignHttp(types.OpWrite, "abc", pairs.WithContentType("application/json"))
req, err := store.QuerySignHttp(types.OpWriteMultipart, "abc", pairs.WithMultipartId("qqqq")) Looks nice. |
I will continue the GSP based on this. |
We provide an API
Reach
for generating an URL for an object for the user to get.Maybe we can provide like
Reach
but for uploading an object.The text was updated successfully, but these errors were encountered: