public async Task <IActionResult> SetObjectAclPrivate() { try { var result = await _ossService.SetObjectAclAsync(_bucketName, _objectFilePath, AccessMode.Private); if (result) { var acl = await _ossService.GetObjectAclAsync(_bucketName, _objectFilePath); 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> GetObjectAcl() { try { var result = await _OSSService.GetObjectAclAsync(_bucketName, "PHOTO-1.jpg"); return(Content(result.ToString())); } catch (Exception ex) { return(Content(ex.Message)); } }