コード例 #1
0
        public async Task <IActionResult> GetObjectMetadata()
        {
            try
            {
                var result = await _OSSService.GetObjectMetadataAsync(_bucketName, "PHOTO-1.jpg");

                return(Json(result));
            }
            catch (Exception ex)
            {
                return(Content(ex.Message));
            }
        }
コード例 #2
0
        public async Task <IActionResult> GetObjectMetadata()
        {
            try
            {
                var result = await _ossService.GetObjectMetadataAsync(_bucketName, _objectFilePath);

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