From 8dfcb7c56a2af20de7dd02371f16592025465540 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 13 Nov 2015 23:27:29 -0800 Subject: [PATCH] GithubApi: fix the name of the asset. --- src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt b/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt index 7447631d..3eb23de2 100644 --- a/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt +++ b/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt @@ -73,7 +73,8 @@ public class GithubApi @Inject constructor(val executors: KobaltExecutors, private fun uploadAsset(token: String, uploadUrl: String, typedFile: TypedFile, tagName: String) : Observable { val strippedUrl = uploadUrl.substring(0, uploadUrl.indexOf("{")) - val url = "$strippedUrl?name=$tagName&label=$tagName" + val fileName = typedFile.file().name + val url = "$strippedUrl?name=$fileName&label=$fileName" val headers = Headers.of("Authorization", "token $token") val totalSize = typedFile.file().length() http.uploadFile(url = url, file = typedFile, headers = headers,