Get a file URL
Import the function at the top of your file
import { getFileUrl } from "swizzle-js";
Get a publicly accessible link (valid for 24 hours) for any file with getFileUrl(unsignedUrl)
. Returns the signed URL of the file.
const publicUrl = await getFileUrl(unsignedUrl)
You can also get the first file matching a specific fileName
like this (not recommended).
const publicUrl = await getFileUrl(undefined, fileName)
Last updated