protected override void OnStart(string[] args) { QiNiuWork.QiNiuWorkUtil qiNiuWork = new QiNiuWork.QiNiuWorkUtil(); QiNiuConfig qiNiuConfig = new QiNiuConfig(); qiNiuConfig.AK = _configModel.QiNiuAccessKey; qiNiuConfig.SK = _configModel.QiNiuSecretKey; qiNiuConfig.Bucket = _configModel.QiNiuSpace; //qiNiuConfig.LocalFile = @"C:\Users\z8489\Documents\GitHub\Bookmarks\QNBookmarkWpf\bin\Debug\config.json"; qiNiuConfig.UploadH = UploadFileMessge; qiNiuWork.UploadFile(qiNiuConfig); }
public ActionResult AddOrEdit(int id = 0) { ViewBag.UpToken = QiNiuConfig.GetToken(); if (id == 0) { return(View(new Video())); } else { ViewBag.CurrentUrl = Url.Content("~/Admin/Video"); var entity = dal.Get <Video>(id); return(View(entity)); } }
private void SysT_OnClick(object sender, RoutedEventArgs e) { if (QiNiuWorkUtil.HttpDownload(_configModel.DownloadUrl, "old_data.js")) { if (BookmarksData.ContrastBookmarks(_myBookmarkses)) { QiNiuConfig qiNiuConfig = new QiNiuConfig(); qiNiuConfig.AK = _configModel.QiNiuAccessKey; qiNiuConfig.SK = _configModel.QiNiuSecretKey; qiNiuConfig.Bucket = _configModel.QiNiuSpace; qiNiuConfig.UploadH = UploadFileMessge; QiNiuWork.QiNiuWorkUtil qiNiuWork = new QiNiuWork.QiNiuWorkUtil(); qiNiuWork.Delete(qiNiuConfig); qiNiuWork.UploadFile(qiNiuConfig); } } }