Merge remote-tracking branch 'origin/feature/remote-media' into feature/remote-media

This commit is contained in:
usbharu 2023-11-02 19:58:48 +09:00
commit 61f4a49756
2 changed files with 2 additions and 5 deletions

View File

@ -126,14 +126,14 @@ class APNoteServiceImpl(
postQueryService.findByUrl(it)
}
val mediaList = note.attachment
.filter { it.url != null }
.map {
mediaService.uploadRemoteMedia(
RemoteMedia(
(it.name ?: it.url)!!,
it.url!!, it.mediaType ?: "application/octet-stream"
it.url!!,
it.mediaType ?: "application/octet-stream"
)
)
}

View File

@ -95,7 +95,6 @@ class MediaServiceImpl(
)
}
// TODO: 仮の処理として保存したように動かす
override suspend fun uploadRemoteMedia(remoteMedia: RemoteMedia): Media {
logger.info("MEDIA Remote media. filename:${remoteMedia.name} url:${remoteMedia.url}")
@ -145,7 +144,6 @@ class MediaServiceImpl(
mediaBlurhashService.generateBlurhash(ImageIO.read(bytes.inputStream()))
}
return mediaRepository.save(
EntityMedia(
id = mediaRepository.generateId(),
@ -159,7 +157,6 @@ class MediaServiceImpl(
)
}
companion object {
private val logger = LoggerFactory.getLogger(MediaServiceImpl::class.java)
}