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