phoenix_live_view
    Preparing search index...

    Function getFileURLForUpload

    • Returns an object URL for the file matching the given upload ref, or null if no matching file is found.

      Parameters

      • input: HTMLElement

        The file input element associated with the upload.

      • uploadRef: string

        The upload ref identifying the file entry.

      Returns string

      import { getFileURLForUpload } from "phoenix_live_view"

      let url = getFileURLForUpload(inputEl, uploadRef)
      if (url) { imgEl.src = url }