Fix media descriptions being wrapped with string
This commit is contained in:
parent
03cf950bab
commit
ed1d35b539
@ -284,7 +284,11 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var postSub: Disposable? = null
|
var postSub: Disposable? = null
|
||||||
val inter = pixelfedAPI.mediaUpload("Bearer $accessToken", data.imageDescription, requestBody.parts[0])
|
|
||||||
|
val description = data.imageDescription?.let { MultipartBody.Part.createFormData("description", it) }
|
||||||
|
|
||||||
|
|
||||||
|
val inter = pixelfedAPI.mediaUpload("Bearer $accessToken", description, requestBody.parts[0])
|
||||||
|
|
||||||
postSub = inter
|
postSub = inter
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
|
@ -256,7 +256,7 @@ interface PixelfedAPI {
|
|||||||
fun mediaUpload(
|
fun mediaUpload(
|
||||||
//The authorization header needs to be of the form "Bearer <token>"
|
//The authorization header needs to be of the form "Bearer <token>"
|
||||||
@Header("Authorization") authorization: String,
|
@Header("Authorization") authorization: String,
|
||||||
@Part("description") description: String?,
|
@Part description: MultipartBody.Part? = null,
|
||||||
@Part file: MultipartBody.Part
|
@Part file: MultipartBody.Part
|
||||||
): Observable<Attachment>
|
): Observable<Attachment>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user