| | |
| | | return Convert.ToBase64String(fileBytes); |
| | | } |
| | | |
| | | [HttpDelete("DeleteImageFile")] |
| | | [HttpPost("DeleteImageFile")] |
| | | public IActionResult DeleteImageFile([FromQuery] string filePath) |
| | | { |
| | | // 检查文件路径是否为空 |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //RetrieveDrawings 调取图纸 |
| | | [HttpGet("OpenDrawingsGet")] |
| | | public IActionResult OpenDrawingsGet(string fileId, string fName) |
| | | { |
| | | try |
| | | { |
| | | var resultInfos = wdd.SendRequest("Download", fileId); |
| | | |
| | | return File(resultInfos, "application/octet-stream", fName); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return StatusCode(500, new ResponseResult |
| | | { |
| | | status = 1, |
| | | message = ex.Message, |
| | | data = null |
| | | }); |
| | | } |
| | | } |
| | | } |