has been using Fastdfs's Open source framework for concurrent data management, now the company in the long-term decision to use seven of cattle cloud storage instead. Seven cattle reputation outside, say the iOS document that called a pit, the demo in the unknown so, few words said, or say to solve the main problem.
The logical relationship is not to be mentioned here. The most important thing about uploading seven cows is token acquisition, and the replies to the documentation and forums are straightforward: tokens are available through the server. Seven cows do not oppose the client to generate tokens only for security reasons, the referral server to generate callbacks, but even if you do not cherish the words such as gold at least to write a clear point to call the document it. Finally found a half-day to find seven cattle online token generator: Http://jsfiddle.net/gh/get/extjs/4.2/icattlecoder/jsfiddle/tree/master/uptoken here to do a simple explanation.
A few useful places have been marked, all of which are necessary.
AK and SK can be found in the Space settings key. Buckename is the domain name that was previously applied, such as the test domain name I applied for is test.qiniudn.com, then Buckename is test. The key is the file name of the upload, although here the property is optional, but as the user upload must have a name in order to get the download later. Fill in the information you need to generate Uploadtoken, which is generated
Then is the demo changes, the entire demo only need to modify two places can be uploaded to the space of personal application, no need to modify any URL, seven cattle is to follow Buckename find your application space
The Self is modified in the 1.-( void) Viewdidload method. Token value, modified to the generated token,
2.- (ibaction) Simpleupload: (ID) Sender upload trigger method to modify _filepath and key
[self. Suploaderuploadfile:_filepath key:@ "[email protected]. PNG " extra:nil];
_filepath OK is to upload the path of the file, key is to upload the file name, I upload a picture, here should be more clear.
You can query your space after uploading.
It's been uploaded here.
Now the test token resolved, through the server to get the background developers need to cooperate, as well as other processing will not be in-depth analysis, good luck
iOS Seven Cow cloud storage