LocalFileToDataUrl Op

LocalFileToDataUrl

load a local file and output as data url


<p>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.</p> <p>Internally it uses an <code>&amp;lt;input type=&quot;file&quot;/&amp;gt;</code> , the way standard html file select </p> <h3>Accept Parameter</h3> <ul> <li>A valid case-insensitive filename extension, starting with a period (&quot;.&quot;) character. For example: <code>.jpg</code>, <code>.pdf</code>, or <code>.doc</code></li> <li>Multiple extensions seperated by comma, like <code>.png,.jpg</code></li> <li>A valid MIME type string, with no extensions.</li> <li>The string <code>audio/</code> meaning &quot;any audio file&quot;.</li> <li>The string <code>video/</code> meaning &quot;any video file&quot;.</li> <li>The string <code>image/*</code> meaning &quot;any image file&quot;.</li> </ul>


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


INPUT PORTS


link (Object)
Text (String)
Button Text (String)
Accept Files (String)
Allow Multiple Files (Number:

<i>boolean</i>

)

Id (Number:

<i>string</i>

)

Visible (Number:

<i>boolean</i>

)

Grey Out (Number:

<i>boolean</i>

)

Show Dialog (Trigger)
Reset (Trigger)

OUTPUT PORTS


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

<p>File Select Button now shows Filename when a file was selected</p>

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