LocalFileToDataUrl Op

LocalFileToDataUrl

load a local file and output as data url


Let the user select a file from their local harddrive. The file is not loaded to any server, it is just loaded in to memory. You can connect the dataUrl output to a texture op to load an image as a texture in cables.

Internally it uses an <input type="file"/> , the way standard html file select

Accept Parameter

  • A valid case-insensitive filename extension, starting with a period (".") character. For example: .jpg, .pdf, or .doc
  • Multiple extensions seperated by comma, like .png,.jpg
  • A valid MIME type string, with no extensions.
  • The string audio/* meaning "any audio file".
  • The string video/* meaning "any video file".
  • The string image/* meaning "any image file".

Full Name
  • Ops.Sidebar.LocalFileToDataUrl
Visibility
  • Core Op - visible for everyone
License
  • MIT
AuthorgithubMaintained by Team


INPUT PORTS


link (Object)
Text (String)
Button Text (String)
Accept Files (String)
Allow Multiple Files (Number: boolean)
Id (Number: string)
Visible (Number: boolean)
Grey Out (Number: boolean)
Show Dialog (Trigger)
Reset (Trigger)

OUTPUT PORTS


childs (Object)
Data URL (String)
Filename (String)
File Object (Object)

File Select Button now shows Filename when a file was selected

Num Files (Number)
Data URLs (Array)
Filenames (Array)
File Changed (Trigger)

Changelog

Patches using LocalFileToDataUrl

  • Examples
  • Public
  • My Patches