Uploading Files to an AWS Signed URL using Ktor on Android

<p>This post is based on a recent experience where the need arose to upload a file directly to an AWS signed URL instead of what we were previously using, GraphQL FileUpload. As there are many good examples of how to perform this upload using Retrofit 2, this post is aimed at helping other Android developers who wish to use&nbsp;<a href="https://ktor.io/" rel="noopener ugc nofollow" target="_blank">Ktor</a>&nbsp;instead of&nbsp;<a href="https://square.github.io/retrofit/" rel="noopener ugc nofollow" target="_blank">Retrofit</a>.</p> <h1>Why Ktor?</h1> <p>According to their own website: &ldquo;Ktor is a framework for easily building connected applications &mdash; web applications, HTTP services, mobile and browser applications. Modern connected applications need to be asynchronous to provide the best experience to users, and Kotlin coroutines provide excellent facilities to do it in an easy and straightforward way. The goal of Ktor is to provide an end-to-end multiplatform framework for connected applications.&rdquo;</p> <p>Two favorable points for Ktor are:</p> <ul> <li>Its ease of implementation, being entirely written in Kotlin, brings a lot of convenience for those already using Kotlin on Android.</li> <li>Can be used in multiplatform projects.</li> </ul> <p>Note: This article will not cover generating the signed URL in AWS. We will assume you already have the URL available.</p> <p><a href="https://medium.com/@shidocorporation/uploading-files-to-an-aws-signed-url-using-ktor-on-android-cb9be71b20b4"><strong>Read More</strong></a></p>
Tags: Ktor Android