Permalink
Browse files

File: Add comments to new methods.

  • Loading branch information...
1 parent 1b84beb commit ef82f5b5df1df6116bfc3c837c6dca1239aa8c81 @jayarjo jayarjo committed Apr 5, 2013
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/plupload.js
View
@@ -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) {

0 comments on commit ef82f5b

Please sign in to comment.