From 985994f362e902a3b2609632822693a03ec44cf1 Mon Sep 17 00:00:00 2001 From: Armin Date: Sat, 23 Mar 2024 13:47:36 +0100 Subject: [PATCH] Add filename to uploadFile --- src/main/kotlin/de/cyface/uploader/DefaultUploader.kt | 1 + src/main/kotlin/de/cyface/uploader/Uploader.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt b/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt index a612585..7993025 100644 --- a/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt +++ b/src/main/kotlin/de/cyface/uploader/DefaultUploader.kt @@ -88,6 +88,7 @@ class DefaultUploader(private val apiEndpoint: String) : Uploader { metaData: RequestMetaData, measurementId: Long, file: File, + fileName: String, progressListener: UploadProgressListener ): Result { val endpoint = attachmentsEndpoint(measurementId) diff --git a/src/main/kotlin/de/cyface/uploader/Uploader.kt b/src/main/kotlin/de/cyface/uploader/Uploader.kt index addf74c..7fe18a8 100644 --- a/src/main/kotlin/de/cyface/uploader/Uploader.kt +++ b/src/main/kotlin/de/cyface/uploader/Uploader.kt @@ -59,6 +59,7 @@ interface Uploader { * @param metaData The [RequestMetaData] required for the upload request. * @param measurementId The id of the measurement the file is attached to. * @param file The attachment file to upload via this post request. + * @param fileName How the transfer file should be named when uploading. * @param progressListener The [UploadProgressListener] to be informed about the upload progress. * @throws UploadFailed when an error occurred. * @return [Result.UPLOAD_SUCCESSFUL] when successful and [Result.UPLOAD_SKIPPED] when the server is @@ -70,6 +71,7 @@ interface Uploader { metaData: RequestMetaData, measurementId: Long, file: File, + fileName: String, progressListener: UploadProgressListener ): Result