Skip to content

Commit 651d643

Browse files
committed
Fix Swashbuckle 6.9 IFormFile/FromForm schema generation error
Swashbuckle 6.9.0 requires [Consumes("multipart/form-data")] on actions that use [FromForm] with IFormFile. Add it to ExportController.ImportDatabase to unblock PR #489 (dotnet-minor-patch group with Swashbuckle 6.5→6.9).
1 parent e302c9c commit 651d643

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backend/src/Taskdeck.Api/Controllers/ExportController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public async Task<IActionResult> ExportDatabase()
8383
}
8484

8585
[HttpPost("import/database")]
86+
[Consumes("multipart/form-data")]
8687
public async Task<IActionResult> ImportDatabase([FromForm] IFormFile? file)
8788
{
8889
if (!TryGetCurrentUserId(out var userId, out var errorResult))

0 commit comments

Comments
 (0)