Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for parsePostPolicyForm (0.19 sec)

  1. cmd/postpolicyform_test.go

    			success: true,
    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			_, err := parsePostPolicyForm(strings.NewReader(testCase.policy))
    			if testCase.success && err != nil {
    				t.Errorf("Expected success but failed with %s", err)
    			}
    			if !testCase.success && err == nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 8.9K bytes
    - Viewed (0)
  2. cmd/postpolicyform.go

    				}
    				sset.Add(kv.Key)
    			}
    			e.Encode(kvs)
    		}
    	}
    	return &buf, d.Err()
    }
    
    // parsePostPolicyForm - Parse JSON policy string into typed PostPolicyForm structure.
    func parsePostPolicyForm(r io.Reader) (PostPolicyForm, error) {
    	reader, err := sanitizePolicy(r)
    	if err != nil {
    		return PostPolicyForm{}, err
    	}
    
    	d := json.NewDecoder(reader)
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  3. cmd/bucket-handlers.go

    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	// Handle policy if it is set.
    	if len(policyBytes) > 0 {
    		postPolicyForm, err := parsePostPolicyForm(bytes.NewReader(policyBytes))
    		if err != nil {
    			errAPI := errorCodes.ToAPIErr(ErrPostPolicyConditionInvalidFormat)
    			errAPI.Description = fmt.Sprintf("%s '(%s)'", errAPI.Description, err)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 16:27:27 GMT 2024
    - 61.6K bytes
    - Viewed (0)
Back to top