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".

Edit Documentation

Full Name
  • Ops.Sidebar.LocalFileToDataUrl
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorTest Patches


 

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)

Patches using LocalFileToDataUrl

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarpandur - 2020-08-19 12:11
Ops.User.pandur.LocalFileToDataUrl renamed to Ops.Sidebar.LocalFileToDataUrluser avatarpandur - 2020-08-19 15:26
react properly to disconnecting parentuser avatarstephan - 2022-02-03 12:34
featureadded input field for button textuser avatarpandur - 2024-01-23 09:07
featureFile Select Button now shows Filename when a file was selecteduser avatarpandur - 2024-02-02 10:41
featureAdded Accept input to filter accepable files by extensionuser avatarpandur - 2024-02-02 10:50
featureAdded Option to select multiple files at the same timeuser avatarpandur - 2024-02-07 16:17