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,