diff --git a/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt b/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt index aed9407..a612585 100644 --- a/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt +++ b/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt @@ -90,7 +90,7 @@ class DefaultUploader(private val apiEndpoint: String) : Uploader { file: File, progressListener: UploadProgressListener ): Result { - val endpoint = filesEndpoint(measurementId) + val endpoint = attachmentsEndpoint(measurementId) return uploadFile(jwtToken, metaData, file, endpoint, progressListener) } @@ -98,8 +98,8 @@ class DefaultUploader(private val apiEndpoint: String) : Uploader { return URL(returnUrlWithTrailingSlash(apiEndpoint) + "measurements") } - override fun filesEndpoint(measurementId: Long): URL { - return URL(returnUrlWithTrailingSlash(apiEndpoint) + "measurements/$measurementId/files") + override fun attachmentsEndpoint(measurementId: Long): URL { + return URL(returnUrlWithTrailingSlash(apiEndpoint) + "measurements/$measurementId/attachments") } @Throws(UploadFailed::class) diff --git a/src/main/kotlin/de/cyface/uploader/Uploader.kt b/src/main/kotlin/de/cyface/uploader/Uploader.kt index 9bc94bb..addf74c 100644 --- a/src/main/kotlin/de/cyface/uploader/Uploader.kt +++ b/src/main/kotlin/de/cyface/uploader/Uploader.kt @@ -88,5 +88,5 @@ interface Uploader { * @throws MalformedURLException if the endpoint address is malformed. */ @Throws(MalformedURLException::class) - fun filesEndpoint(measurementId: Long): URL + fun attachmentsEndpoint(measurementId: Long): URL }