public async Task <IActionResult> ListBucketFiles()
        {
            try
            {
                var result = await _OSSService.ListObjectsAsync(_bucketName);

                return(Json(result));
            }
            catch (Exception ex)
            {
                return(Content(ex.Message));
            }
        }
Пример #2
0
        public async Task <IActionResult> ListObjects()
        {
            try
            {
                var result = await _ossService.ListObjectsAsync(_bucketName);

                return(Json(new ResultObject()
                {
                    Status = true,
                    Data = result,
                }));
            }
            catch (Exception ex)
            {
                return(Json(new ResultObject()
                {
                    Status = false,
                    Message = ex.Message
                }));
            }
        }