naystack - v1.9.9
    Preparing search index...

    Function uploadFile

    • Uploads a file to S3 at the given key(s), either from a Blob or a remote URL.

      Parameters

      • keys: string | string[]

        S3 key or key path segments (array joined by /).

      • source: { blob?: Blob; put?: PutOverrides; url?: string }

        { blob } to upload a Blob/File directly, or { url } to fetch a remote URL and upload that (ignored if blob is given). put sets fields on the S3 put — see PutOverrides.

      Returns Promise<string | null | undefined>

      The public download URL of the uploaded file, or null if neither blob nor url was provided.