67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Web;
|
|
using System.Web.SessionState;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.HtmlControls;
|
|
|
|
namespace CompanyWeb
|
|
{
|
|
/// <summary>
|
|
/// ftb_imagegallery 的摘要说明。
|
|
/// </summary>
|
|
public partial class insertvideo : Mtxfw.Utility.MemberBase
|
|
{
|
|
public string upToken = "";
|
|
public int t = 0;
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
protected System.Web.UI.HtmlControls.HtmlForm Form1;
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
// 在此处放置用户代码以初始化页面
|
|
Qiniu.Util.Mac mac = new Qiniu.Util.Mac(config.qiniuAccessKey, config.qiniuSecretKey);
|
|
Qiniu.Storage.PutPolicy putPolicy = new Qiniu.Storage.PutPolicy();
|
|
putPolicy.Scope = config.qiniuScope;
|
|
//putPolicy.CallbackUrl = "http://api.example.com/qiniu/upload/callback";
|
|
//putPolicy.CallbackBody = "{\"key\":\"$(key)\",\"hash\":\"$(etag)\",\"fsiz\":$(fsize),\"bucket\":\"$(bucket)\",\"name\":\"$(x:name)\"}";
|
|
//putPolicy.CallbackBodyType = "application/json";
|
|
upToken = Qiniu.Util.Auth.CreateUploadToken(mac, putPolicy.ToJsonString());
|
|
if (!String.IsNullOrEmpty(Request.QueryString["t"]))
|
|
{
|
|
t = Convert.ToInt32(Request.QueryString["t"].ToString());
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
}
|
|
|
|
#region Web 窗体设计器生成的代码
|
|
override protected void OnInit(EventArgs e)
|
|
{
|
|
//
|
|
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
|
|
//
|
|
InitializeComponent();
|
|
base.OnInit(e);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
|
|
/// 此方法的内容。
|
|
/// </summary>
|
|
protected void InitializeComponent()
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|