diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index 01cabc4..d3b356a 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using LeanCloud.Common; using LeanCloud.Storage.Internal.File; using LeanCloud.Storage.Internal.Object; +using LeanCloud.Storage.Internal.Codec; namespace LeanCloud.Storage { public class LCFile : LCObject { @@ -124,11 +125,13 @@ namespace LeanCloud.Storage { async Task> GetUploadToken() { Dictionary data = new Dictionary { { "name", Name }, - { "key", Guid.NewGuid().ToString() }, { "__type", "File" }, { "mime_type", MimeType }, { "metaData", MetaData } }; + if (ACL != null) { + data["ACL"] = LCEncoder.EncodeACL(ACL); + } return await LCCore.HttpClient.Post>("fileTokens", data: data); }