hello.ui.filePicker

The filePicker UI widget is an easy way to select files to bring into your web app, as a HelloJS plugin it supports the popular cloud drives too.

Opening up a filePicker dialog

In its simplest form we trigger hello.ui.filePicker(callback). The callback in this example is going to loop through the file responses e.g...

Setup

The prerequirements for the filePicker include

  1. The HelloJS SDK, and any additional modules
  2. The FilePicker Stylesheet
  3. The Social buttons
  4. The FilePicker Script
  5. And HelloJS must be initiated like with the "files", "publish_files" and "photos" scope, like so...

Alternative: Opening on demand

It might be you only want to load this on demand. The following example merely opens up a popup to the URL where the FilePicker code resides, e.g...

Handling the FileList response

name type example description default
element HTMLElement HTML DOM element in which to create the filePicker widget creates its own
type string image, image/png, video, text *
multiple bool, integer 5 The number of files the user is allowed to select. false or 0: means they may select only one, n greater than 0 denotes how many they may select and true means that an unlimited number may be selected true