Seven-ox user to build C # SDK for graphic explanation

Source: Internet
Author: User

Qiniu Seven cow problem solution

Description of the problem: very many customers belong to the small white type.

But please do not spray the seven-ox document station casually. Due to the need for a bit of HTTP expertise to understand the API documentation of seven KN. Now I'll get you a C # SDK build step

Problem Solving Method 1, first install NuGet in VS

NuGet Installation (My development environment is visual Studio 2013 flagship, so take this as an example):

The main menu, tools, extensions and updates, open such as the following interface. Click "Online" on the left to search for NuGet. Then search to install.

2, apply NuGet to install the Qiniu SDK

You can right-click on your project. Choose to manage your NuGet package. You can then select Online to search for the Qiniu string. Click Install.

Your seven KN C # SDK application environment is built.


3, you need a plugin is a JSON plugin

4, the environment has been well-equipped, now to import the code of seven cattle documents to project. (The code for the above file is a sample)
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingsystem.web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingWebapplication1.io;usingQiniu.conf;namespace Webapplication1.up { Public Partial classUpload:System.Web.UI.Page { Public Static void Putfile(stringBucketstringKeystringfname) {//access_key, Secret_key to go to the seven bull backstage secret key to get. Bucket is a space name created in the background of seven cowsQiniu.Conf.ACCESS_KEY = "" Qiniu.Conf.SECRET_KEY = ""varPolicy =NewPutpolicy (Bucket,3600);stringUptoken = policy. Token (); PutExtra extra =NewPutExtra (); Ioclient client =NewIoclient (); Callret ret = client. Putfile (Uptoken, fname, key);RET is a data class that returns after seven of cows have been uploaded. You can randomly invoke the fields inside.

(别告诉我不会用) if (ret.OK) { // MessageBox.Show("ok"); // MessageBox.Show(ret.Response); } else { // MessageBox.Show(ret.Response); }}} }

Results Demo

As a result I do not demonstrate, there is a problem to submit work order.

There is a way to submit a ticket below every seven KN document.

License

Copyright (c) qiniu.com

Seven-ox user to build C # SDK for graphic explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.