ToParamsDictionary() public method

Maps object model to dictionary of parameters in cloudinary notation.
public ToParamsDictionary ( ) : object>.SortedDictionary
return object>.SortedDictionary
示例#1
0
        /// <summary>
        /// Uploads a file to cloudinary.
        /// </summary>
        /// <param name="parameters">Parameters of file uploading.</param>
        /// <param name="type">The type ("raw" or "auto", last by default).</param>
        public RawUploadResult Upload(RawUploadParams parameters, string type = "auto")
        {
            string uri = m_api.ApiUrlImgUpV.ResourceType(type).BuildUrl();

            ResetInternalFileDescription(parameters.File);

            using (HttpWebResponse response = m_api.Call(HttpMethod.POST, uri, parameters.ToParamsDictionary(), parameters.File))
            {
                return RawUploadResult.Parse(response);
            }
        }
示例#2
0
        /// <summary>
        /// Upload a raw file to cloudinary
        /// </summary>
        /// <param name="parameters">Parameters of uploading a file to cloudinary</param>
        /// <returns>Results of file uploading</returns>
        public RawUploadResult Upload(RawUploadParams parameters)
        {
            string uri = m_api.ApiUrlImgUpV.ResourceType("raw").BuildUrl();

            using (HttpWebResponse response = m_api.Call(HttpMethod.POST, uri, parameters.ToParamsDictionary(), parameters.File))
            {
                return RawUploadResult.Parse(response);
            }
        }