Permalink
Browse files

Underline the fact that DOM elements can now be used directly for bro…

…wse_button and drop_element options. Address #55, #283, #440, #453, #494.
  • Loading branch information...
1 parent f371170 commit 355a95229d1c7eb144c26db8cf016dbaef707013 @jayarjo jayarjo committed Feb 24, 2013
Showing with 5 additions and 4 deletions.
  1. +3 −2 examples/custom.html
  2. +2 −2 src/plupload.js
View
@@ -37,8 +37,9 @@
var uploader = new plupload.Uploader({
- runtimes : 'silverlight,html4',
- browse_button : 'pickfiles',
+ runtimes : 'html5,flash,silverlight,html4',
+ browse_button : 'pickfiles', // you can pass in id or DOM Element itself
+ drop_element : $('container'),
@sgelbart

sgelbart Apr 29, 2013

This didn't work for me as a jQuery element (problem with getStyle function). Tested in Chrome with plupload.full.min.js.

@jayarjo

jayarjo Apr 29, 2013

Owner

There's no jQuery in this example. Also you require Plupload 2.

container: 'container',
max_file_size : '10mb',
url : 'upload.php',
View
@@ -468,11 +468,11 @@ var plupload = {
@constructor
@param {Object} settings For detailed information about each option check documentation.
- @param {String} settings.browse_button id of the DOM element to use as file dialog trigger.
+ @param {String|DOMElement} settings.browse_button id of the DOM element or DOM element itself to use as file dialog trigger.
@param {String} settings.url URL of the server-side upload handler.
@param {Number|String} [settings.chunk_size=0] Chunk size in bytes to slice the file into. Shorcuts with b, kb, mb, gb, tb suffixes also supported. `e.g. 204800 or "204800b" or "200kb"`. By default - disabled.
@param {String} [settings.container] id of the DOM element to use as a container for uploader structures. Defaults to document.body.
- @param {String} [settings.drop_element] id of the DOM element to use as a drop zone for Drag-n-Drop.
+ @param {String|DOMElement} [settings.drop_element] id of the DOM element or DOM element itself to use as a drop zone for Drag-n-Drop.
@param {String} [settings.file_data_name="file"] Name for the file field in Multipart formated message.
@param {Array} [settings.filters=[]] Set of file type filters, each one defined by hash of title and extensions. `e.g. {title : "Image files", extensions : "jpg,jpeg,gif,png"}`. Dispatches `plupload.FILE_EXTENSION_ERROR`
@param {String} [settings.flash_swf_url] URL of the Flash swf.

0 comments on commit 355a952

Please sign in to comment.