fix: LCFile#ACL not work.
parent
70d2e2e422
commit
6891a335ab
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||||
using LeanCloud.Common;
|
using LeanCloud.Common;
|
||||||
using LeanCloud.Storage.Internal.File;
|
using LeanCloud.Storage.Internal.File;
|
||||||
using LeanCloud.Storage.Internal.Object;
|
using LeanCloud.Storage.Internal.Object;
|
||||||
|
using LeanCloud.Storage.Internal.Codec;
|
||||||
|
|
||||||
namespace LeanCloud.Storage {
|
namespace LeanCloud.Storage {
|
||||||
public class LCFile : LCObject {
|
public class LCFile : LCObject {
|
||||||
|
@ -124,11 +125,13 @@ namespace LeanCloud.Storage {
|
||||||
async Task<Dictionary<string, object>> GetUploadToken() {
|
async Task<Dictionary<string, object>> GetUploadToken() {
|
||||||
Dictionary<string, object> data = new Dictionary<string, object> {
|
Dictionary<string, object> data = new Dictionary<string, object> {
|
||||||
{ "name", Name },
|
{ "name", Name },
|
||||||
{ "key", Guid.NewGuid().ToString() },
|
|
||||||
{ "__type", "File" },
|
{ "__type", "File" },
|
||||||
{ "mime_type", MimeType },
|
{ "mime_type", MimeType },
|
||||||
{ "metaData", MetaData }
|
{ "metaData", MetaData }
|
||||||
};
|
};
|
||||||
|
if (ACL != null) {
|
||||||
|
data["ACL"] = LCEncoder.EncodeACL(ACL);
|
||||||
|
}
|
||||||
return await LCCore.HttpClient.Post<Dictionary<string, object>>("fileTokens", data: data);
|
return await LCCore.HttpClient.Post<Dictionary<string, object>>("fileTokens", data: data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue