Dropbox web Chooser adds extension filtering

Dropbox has added support to its web Chooser for filtering files by extension, the company announced today. Developers building tools like photo editors can now restrict file selection to only the formats that make sense for their apps. Android and iOS Chooser support for the feature is planned for the future.

The new filtering works through either the extensions option passed to Dropbox.Choose(options) or the data-extensions property on the <input> tag. Individual extensions such as .pdf or .jpg are supported, as are broader file-type categories including images, audio, video, documents and text. For example, the following HTML restricts the Chooser to .jpg and .png files:

<input type="dropbox-chooser" data-extensions=".jpg .png" data-link-type="direct" />

How it appears to users

When extension filtering is active, users still see their full file list. Files that do not match the allowed extensions are grayed out and cannot be selected. A live example on Dropbox's blog demonstrates the behavior with a .jpg/.png filter.

Feedback

Dropbox credits developers who suggested the feature on its developer forum. The company is inviting further suggestions there as it continues to build out the Chooser's capabilities.