Skip to content

Commit

Permalink
File: Add comments to new methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayarjo committed Apr 5, 2013
1 parent 1b84beb commit ef82f5b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/plupload.js
Expand Up @@ -1717,18 +1717,35 @@ plupload.File = (function() {
*/
status: 0,

/**
* Returns native window.File object, when it's available.
*
* @method getNative
* @return {window.File} or null, if plupload.File is of different origin
*/
getNative: function() {
var file = this.getSource().getSource();
return o.inArray(o.typeOf(file), ['blob', 'file']) !== -1 ? file : null;
},

/**
* Returns mOxie.File - unified wrapper object that can be used across runtimes.
*
* @method getSource
* @return {mOxie.File} or null
*/
getSource: function() {
if (!filepool[this.id]) {
return null;
}
return filepool[this.id];
},

/**
* Destroys plupload.File object.
*
* @method destroy
*/
destroy: function() {
var src = this.getSource();
if (src) {
Expand Down

0 comments on commit ef82f5b

Please sign in to comment.