Skip to content

Instantly share code, notes, and snippets.

@lordcodes
Created February 25, 2020 20:10
Show Gist options
  • Save lordcodes/b5810d32dac4268c4e0f659decc443ee to your computer and use it in GitHub Desktop.
Save lordcodes/b5810d32dac4268c4e0f659decc443ee to your computer and use it in GitHub Desktop.
Code for the article: "Uploading a file with progress in Kotlin"
@Multipart
@POST("file")
fun attachFile(
@Part("name") filename: RequestBody,
@Part("type") mimeType: RequestBody,
@Part("size") fileSize: RequestBody,
@Part filePart: MultipartBody.Part
): Single<AttachmentUploadedRemoteDto>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment