public async Task <IActionResult> SetBucketAclPrivate() { try { var result = await _ossService.SetBucketAclAsync(_bucketName, AccessMode.Private); if (result) { var acl = await _ossService.GetBucketAclAsync(_bucketName); return(Json(new ResultObject() { Status = result, Data = acl.ToString(), })); } else { return(Json(new ResultObject() { Status = false, })); } } catch (Exception ex) { return(Json(new ResultObject() { Status = false, Message = ex.Message })); } }
public async Task <IActionResult> SetBucketAclPrivate() { try { var result = await _OSSService.SetBucketAclAsync(_bucketName, AccessMode.Private); return(Json(result.ToString())); } catch (Exception ex) { return(Content(ex.Message)); } }