// SetObjectACLWithContext sets AccessControlList for object with context controlling
SetObjectACLWithContext sets AccessControlList for object with context controlling
// SetObjectACLWithContext sets AccessControlList for object with context controlling
func (client *Client) SetObjectACLWithContext(ctx context.Context, request *SetObjectACLRequest) error {
	aclBytes, e := json.Marshal(request.ACL)
	if e != nil {
		return errors.New("fds client: can't marshal acl")
	}
	req := &clientRequest{
		BucketName:         request.BucketName,
		ObjectName:         request.ObjectName,
		Method:             HTTPPut,
		QueryHeaderOptions: request,
		Data:               bytes.NewReader(aclBytes),
	}
	resp, err := client.do(ctx, req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	return err
}
func ( client * Client ) SetObjectACLWithContext ( ctx context . Context , request * SetObjectACLRequest ) error { aclBytes , e := json . Marshal ( request . ACL ) if e != nil { return errors . New ( " " ) } req := & clientRequest { BucketName : request . BucketName , ObjectName : request . ObjectName , Method : HTTPPut , QueryHeaderOptions : request , Data : bytes . NewReader ( aclBytes ) , } resp , err := client . do ( ctx , req ) if err != nil { return err } defer resp . Body . Close ( ) return err }
SetObjectACLWithContext sets AccessControlList for object with context controlling
SetObjectACLWithContext sets AccessControlList for object with context controlling