public async Task <IActionResult> RemoveBucket()
        {
            try
            {
                bool result = await _OSSService.RemoveBucketAsync(_bucketName);

                return(Content(result.ToString()));
            }
            catch (Exception ex)
            {
                return(Content(ex.Message));
            }
        }
示例#2
0
        public async Task <IActionResult> RemoveBucket()
        {
            try
            {
                bool result = await _ossService.RemoveBucketAsync(_bucketName);

                return(Json(new ResultObject()
                {
                    Status = result,
                    Message = result ? $"移除储存桶'{_bucketName}'成功。" : $"移除储存桶'{_bucketName}'失败。",
                }));
            }
            catch (Exception ex)
            {
                return(Json(new ResultObject()
                {
                    Status = false,
                    Message = ex.Message
                }));
            }
        }