mirror of https://github.com/tuskyapp/Tusky.git
4 changed files with 37 additions and 10 deletions
@ -0,0 +1,19 @@
|
||||
package com.keylesspalace.tusky.network |
||||
|
||||
import com.keylesspalace.tusky.entity.MediaUploadResult |
||||
import okhttp3.MultipartBody |
||||
import retrofit2.http.Multipart |
||||
import retrofit2.http.POST |
||||
import retrofit2.http.Part |
||||
|
||||
/** endpoints defined in this interface will be called with a higher timeout than usual |
||||
* which is necessary for media uploads to succeed on some servers |
||||
*/ |
||||
interface MediaUploadApi { |
||||
@Multipart |
||||
@POST("api/v2/media") |
||||
suspend fun uploadMedia( |
||||
@Part file: MultipartBody.Part, |
||||
@Part description: MultipartBody.Part? = null |
||||
): Result<MediaUploadResult> |
||||
} |
||||
Loading…
Reference in new issue