Skip to content

Commit 4e93a16

Browse files
committed
addDeleteAfterDays
1 parent 45319cc commit 4e93a16

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Qiniu/RS/PutPolicy.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class PutPolicy
3232
private string callbackHost;
3333
private string callbackBodyType;
3434
private int callbackFetchKey;
35+
private int deleteAfterDays;
3536

3637
/// <summary>
3738
/// 一般指文件要上传到的目标存储空间(Bucket)。若为”Bucket”,表示限定只能传到该Bucket(仅限于新增文件);若为”Bucket:Key”,表示限定特定的文件,可修改该文件。
@@ -243,6 +244,15 @@ public int CallbackFetchKey
243244
set { callbackFetchKey = value; }
244245
}
245246

247+
248+
/// <summary>
249+
/// 文件在多少天后被删除,七牛将文件上传时间与指定的deleteAfterDays天数相加,得到的时间入到后一天的午夜(CST,中国标准时间),从而得到文件删除开始时间。例如文件在2015年1月1日上午10:00 CST上传,指定deleteAfterDays为3天,那么会在2015年1月5日00:00 CST之后当天内删除文件
250+
/// </summary>
251+
public int DeleteAfterDays
252+
{
253+
get { return deleteAfterDays; }
254+
set { deleteAfterDays = value; }
255+
}
246256
/// <summary>
247257
/// Initializes a new instance of the <see cref="Qiniu.RS.PutPolicy"/> class.
248258
/// </summary>

0 commit comments

Comments
 (0)