mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
GithubApi: fix the name of the asset.
This commit is contained in:
parent
bc0eac0d0a
commit
8dfcb7c56a
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,8 @@ public class GithubApi @Inject constructor(val executors: KobaltExecutors,
|
||||||
private fun uploadAsset(token: String, uploadUrl: String, typedFile: TypedFile, tagName: String)
|
private fun uploadAsset(token: String, uploadUrl: String, typedFile: TypedFile, tagName: String)
|
||||||
: Observable<UploadAssetResponse> {
|
: Observable<UploadAssetResponse> {
|
||||||
val strippedUrl = uploadUrl.substring(0, uploadUrl.indexOf("{"))
|
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 headers = Headers.of("Authorization", "token $token")
|
||||||
val totalSize = typedFile.file().length()
|
val totalSize = typedFile.file().length()
|
||||||
http.uploadFile(url = url, file = typedFile, headers = headers,
|
http.uploadFile(url = url, file = typedFile, headers = headers,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue