示例#1
0
        public IActionResult GetFileSize(long id, string name)
        {
            //データの存在チェック
            var property = dataRepository.GetDataProperty(id, name);

            if (property == null || property.DataFile == null)
            {
                return(JsonNotFound($"Data ID {id} or file name {name} is not found."));
            }

            var fileSize = storageLogic.GetFileSize(ResourceType.Data, property.DataFile.StoredPath);

            return(JsonOK(new DataFileOutputModel {
                Id = id, Key = name, FileId = property.Id, FileName = property.DataFile.FileName, FileSize = fileSize
            }));
        }