Uploader OverviewThe Infusion Uploader provides an easy way for users to upload many files at once, providing useful feedback about the status and progress of each file along the way. Uploader implements a couple different ways to upload multiple files. With its built-in support for progressive enhancement, users will automatically receive a version of the Uploader best suited to the capabilities of their browsers. There are two different flavours of Uploader: - Single file: delivered to browsers that don't support JavaScript and HTML 5
- HTML 5: the best and most widely-supported version of Uploader, suitable for modern browsers
The HTML 5 version of the Uploader will be delivered to modern, standards-compliant browsers, including: - Internet Explorer 10+
- Firefox 3.6+
- Safari 4+
- Google Chrome
NOTE: As of Infusion 1.5, the Flash version of the Uploader has been removed due to a cross-site scripting vulnerability. Progressive EnhancementThe Uploader utilizes the concept of progressive enhancement. The goal is to ensure that the page is usable by the widest possible audience, even with old browsers or when JavaScript is turned off. This is done by specifying a regular file input element in the markup. When the Uploader is initialized, the Upload code will replace that element with the Fluid Uploader. As of Infusion 1.3, progressive enhancement will occur automatically by default. It can be overridden by choosing a specific upload strategy instead of using the fluid.uploader.progressiveStrategy . Upload StrategyThe Infusion Uploader, like many Fluid components, is really one interface to a collection of components that work together to provide a unified user experience. The Uploader provides a facade object, called a strategy , which represents the entire subsystem for a particular implementation of Uploader. There are currently two different strategies available to choose from: fluid.uploader.html5Strategy , which provides the modern HTML 5 implementation of Uploaderfluid.uploader.progressiveStrategy , which uses the new Infusion IoC - Inversion of Control System to deliver the best possible version of Uploader based on the capabilities of the user's browser.
The default strategy for Uploader is fluid.uploader.progressiveStrategy . UpgradingUpgrading from Infusion 1.2: The Uploader was substantially refactored for the Infusion 1.3 in order to support the new HTML 5 version. However, most users should be unaffected. All events, selectors, and classes remain compatible with previous versions. Since the Uploader's underlying structure has changed significantly, and support for Infusion's IoC System was introduced, several other configuration options have changed. In order to ease the transition, we've provided a compatibility file that will automatically transform your options from the old format to the new when you invoke fluid.uploader() . This can be enabled simply by including the UploaderCompatibility-Infusion1.2.js file your page. If you're not using a custom build of Infusion, you will also need to include the framework's ModelTransformations.js file. |