Skip to content

How to Upload a File using Retrofit 2.0 #1063

Closed
@vivekkiran

Description

@vivekkiran

How to upload a file using multipart/form-data upload in Retrofit 2.0, I am unable to upload and there is no proper documentation anywhere on uploading file using retrofit 2.0, I followed the docs in retrofit website but I was not able to make it work.

All the examples I see used TypedFile. It is not clear how to use RequestBody. Please post sample code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions