Ejemplo n.º 1
0
            public Dictionary <string, string> GetFormParameters()
            {
                Dictionary <string, string> formParameters = new Dictionary <string, string>();

                if (acl != null)
                {
                    formParameters.Add("Acl", acl);
                }

                foreach (KeyValuePair <string, string> pair in headers)
                {
                    formParameters.Add(pair.Key, pair.Value);
                }

                formParameters.Add("key", key);

                if (successActionRedirect != null)
                {
                    formParameters.Add("success_action_redirect", successActionRedirect);
                }

                if (successActionStatus != null)
                {
                    formParameters.Add("success_action_status", successActionStatus);
                }

                foreach (KeyValuePair <string, string> pair in customHeaders)
                {
                    formParameters.Add(pair.Key, pair.Value);
                }

                if (xCosStorageClass != null)
                {
                    formParameters.Add("x-cos-storage-class", xCosStorageClass);
                }

                if (xCOSTrafficLimit != null)
                {
                    formParameters.Add(CosRequestHeaderKey.X_COS_TRAFFIC_LIMIT, xCOSTrafficLimit);
                }

                if (policy != null)
                {
                    formParameters.Add("policy", DigestUtils.GetBase64(policy.Content(), Encoding.UTF8));
                }

                return(formParameters);
            }