mirror of
https://github.com/usbharu/Hideout.git
synced 2026-07-20 12:13:36 +00:00
Merge remote-tracking branch 'origin/controller-test' into controller-test
This commit is contained in:
-2
@@ -40,13 +40,11 @@ class SpringMediaApi(
|
||||
description: String?,
|
||||
focus: String?,
|
||||
): ResponseEntity<MediaAttachment> {
|
||||
|
||||
if (file.size == 0L) {
|
||||
logger.warn("File is empty.")
|
||||
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "File is empty.")
|
||||
}
|
||||
|
||||
|
||||
val tempFile = Files.createTempFile("hideout-tmp-file", ".tmp")
|
||||
|
||||
Files.newOutputStream(tempFile).use { outputStream ->
|
||||
|
||||
Reference in New Issue
Block a user