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
|
||||
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
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
|
|
@ -256,7 +256,7 @@ interface PixelfedAPI {
|
|||
fun mediaUpload(
|
||||
//The authorization header needs to be of the form "Bearer <token>"
|
||||
@Header("Authorization") authorization: String,
|
||||
@Part("description") description: String?,
|
||||
@Part description: MultipartBody.Part? = null,
|
||||
@Part file: MultipartBody.Part
|
||||
): Observable<Attachment>
|
||||
|
||||
|
|
Loading…
Reference in New Issue