Merge remote-tracking branch 'origin/controller-test' into controller-test

This commit is contained in:
usbharu 2024-09-16 22:43:58 +09:00
commit 42c6e0b093
Signed by: usbharu
GPG Key ID: 95CBCF7046307B77
1 changed files with 0 additions and 2 deletions

View File

@ -40,13 +40,11 @@ class SpringMediaApi(
description: String?, description: String?,
focus: String?, focus: String?,
): ResponseEntity<MediaAttachment> { ): ResponseEntity<MediaAttachment> {
if (file.size == 0L) { if (file.size == 0L) {
logger.warn("File is empty.") logger.warn("File is empty.")
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "File is empty.") throw ResponseStatusException(HttpStatus.BAD_REQUEST, "File is empty.")
} }
val tempFile = Files.createTempFile("hideout-tmp-file", ".tmp") val tempFile = Files.createTempFile("hideout-tmp-file", ".tmp")
Files.newOutputStream(tempFile).use { outputStream -> Files.newOutputStream(tempFile).use { outputStream ->