Elmar

Upload files with Expo and Hono

Jul 20, 2024

UploadAsync is a function to upload files typesafe in Expo using FileSystem.uploadAsync. It infers the fieldName and response from the Hono RPC client.

      import type {  } from "./server";
import {  } from "./upload-async";

const  = <>("YOUR_SERVER_URL");

async function (: File) {
  const  = await (., "", {
    : "
",
}); //typesafe .su
;
}