123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html>
- <head>
- <title>Class: plupload</title>
- <meta name="generator" content="MoxieDoc" />
- <link rel="stylesheet" type="text/css" href="css/reset.css" />
- <link rel="stylesheet" type="text/css" href="css/grids.css" />
- <link rel="stylesheet" type="text/css" href="css/general.css" />
- <script type="text/javascript" src="http://www.google.com/jsapi"></script>
- <script type="text/javascript">
- google.load("jquery", "1.3");
- </script>
- <script type="text/javascript" src="js/jquery.treeview.min.js"></script>
- <script type="text/javascript" src="js/general.js"></script>
- </head>
- <body>
- <div class="classDetailsContent">
- <h1>plupload</h1>
- <table class="classDetails">
- <tr>
- <td class="first">Class</td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">Type</td>
- <td class="last">Singleton</td>
- </tr>
- </table>
- <div class="classDescription">Plupload class with some global constants and functions.
- </div>
- <h4>Example</h4>
- <pre class="brush: js;">// Encode entities
- console.log(plupload.xmlEncode("My string <>"));
- // Generate unique id
- console.log(plupload.guid());</pre>
- <div class="summaryLists">
- <h2>Public Properties</h2>
- <table class="Properties summary">
- <thead>
- <tr>
- <th>Property</th>
- <th>Defined By</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#DONE">DONE</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>File has been uploaded successfully</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#FAILED">FAILED</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>File has failed to be uploaded</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#FILE_EXTENSION_ERROR">FILE_EXTENSION_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>File extension error.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#FILE_SIZE_ERROR">FILE_SIZE_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>File size error.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#GENERIC_ERROR">GENERIC_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Generic error for example if an exception is thrown inside Silverlight.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#HTTP_ERROR">HTTP_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>HTTP transport error.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#INIT_ERROR">INIT_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Initialization error.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#IO_ERROR">IO_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Generic I/O error.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#mimeTypes">mimeTypes</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Mime type lookup table.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#QUEUED">QUEUED</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>File is queued for upload</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#SECURITY_ERROR">SECURITY_ERROR</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Generic I/O error.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#STARTED">STARTED</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Upload process is running</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#STOPPED">STOPPED</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>Inital state of the queue and also the state ones it's finished all it's uploads.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#UPLOADING">UPLOADING</a> : Object</div>
- <div class="summary">
- <span class="static">[static] </span>File is being uploaded</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- </tbody>
- </table>
- <h2>Public Methods</h2>
- <table class="Methods summary">
- <thead>
- <tr>
- <th>Method</th>
- <th>Defined By</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#addRuntime">addRuntime</a>(name:String, obj:Object):void</div>
- <div class="summary">
- <span class="static">[static] </span>Adds a specific upload runtime like for example flash or gears.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#cleanName">cleanName</a>(s:String):String</div>
- <div class="summary">
- <span class="static">[static] </span>Cleans the specified name from national characters (diacritics).</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#extend">extend</a>(target:Object, obj:Object..):Object</div>
- <div class="summary">
- <span class="static">[static] </span>Extends the specified object with another object.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#formatSize">formatSize</a>(size:Number):String</div>
- <div class="summary">
- <span class="static">[static] </span>Formats the specified number as a size string for example 1024 becomes 1 KB.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#getPos">getPos</a>(node:Element, root:Element):object</div>
- <div class="summary">
- <span class="static">[static] </span>Returns the absolute x, y position of an Element.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#guid">guid</a>():String</div>
- <div class="summary">
- <span class="static">[static] </span>Generates an unique ID.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#parseSize">parseSize</a>(size:String/Number):Number</div>
- <div class="summary">
- <span class="static">[static] </span>Parses the specified size string into a byte value.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr class="even">
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#toArray">toArray</a>(obj:Object):Array</div>
- <div class="summary">
- <span class="static">[static] </span>Forces anything into an array.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- <tr>
- <td class="first">
- <div>
- <a class="memberName" href="class_plupload.html#xmlEncode">xmlEncode</a>(s:String):String</div>
- <div class="summary">
- <span class="static">[static] </span>Encodes the specified string.</div>
- </td>
- <td class="last">plupload</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="detailsList">
- <div class="details">
- <h2>Property details</h2>
- <div class="memberDetails" id="DONE">
- <h3>DONE<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static DONE : Object</code>
- <div class="memberDescription">File has been uploaded successfully
- </div>
- </div>
- <div class="memberDetails" id="FAILED">
- <h3>FAILED<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static FAILED : Object</code>
- <div class="memberDescription">File has failed to be uploaded
- </div>
- </div>
- <div class="memberDetails" id="FILE_EXTENSION_ERROR">
- <h3>FILE_EXTENSION_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static FILE_EXTENSION_ERROR : Object</code>
- <div class="memberDescription">File extension error. If the user selects a file that isn't valid according to the filters setting.
- </div>
- </div>
- <div class="memberDetails" id="FILE_SIZE_ERROR">
- <h3>FILE_SIZE_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static FILE_SIZE_ERROR : Object</code>
- <div class="memberDescription">File size error. If the user selects a file that is to large it will be blocked and an error of this type will be triggered.
- </div>
- </div>
- <div class="memberDetails" id="GENERIC_ERROR">
- <h3>GENERIC_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static GENERIC_ERROR : Object</code>
- <div class="memberDescription">Generic error for example if an exception is thrown inside Silverlight.
- </div>
- </div>
- <div class="memberDetails" id="HTTP_ERROR">
- <h3>HTTP_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static HTTP_ERROR : Object</code>
- <div class="memberDescription">HTTP transport error. For example if the server produces a HTTP status other than 200.
- </div>
- </div>
- <div class="memberDetails" id="INIT_ERROR">
- <h3>INIT_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static INIT_ERROR : Object</code>
- <div class="memberDescription">Initialization error. Will be triggered if no runtime was initialized.
- </div>
- </div>
- <div class="memberDetails" id="IO_ERROR">
- <h3>IO_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static IO_ERROR : Object</code>
- <div class="memberDescription">Generic I/O error. For exampe if it wasn't possible to open the file stream on local machine.
- </div>
- </div>
- <div class="memberDetails" id="mimeTypes">
- <h3>mimeTypes<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static mimeTypes : Object</code>
- <div class="memberDescription">Mime type lookup table.
- </div>
- </div>
- <div class="memberDetails" id="QUEUED">
- <h3>QUEUED<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static QUEUED : Object</code>
- <div class="memberDescription">File is queued for upload
- </div>
- </div>
- <div class="memberDetails" id="SECURITY_ERROR">
- <h3>SECURITY_ERROR<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static SECURITY_ERROR : Object</code>
- <div class="memberDescription">Generic I/O error. For exampe if it wasn't possible to open the file stream on local machine.
- </div>
- </div>
- <div class="memberDetails" id="STARTED">
- <h3>STARTED<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static STARTED : Object</code>
- <div class="memberDescription">Upload process is running
- </div>
- </div>
- <div class="memberDetails" id="STOPPED">
- <h3>STOPPED<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static STOPPED : Object</code>
- <div class="memberDescription">Inital state of the queue and also the state ones it's finished all it's uploads.
- </div>
- </div>
- <div class="memberDetails last" id="UPLOADING">
- <h3>UPLOADING<span class="memberType">property</span>
- </h3>
- <code class="syntax">public static UPLOADING : Object</code>
- <div class="memberDescription">File is being uploaded
- </div>
- </div>
- </div>
- <div class="details">
- <h2>Method details</h2>
- <div class="memberDetails" id="addRuntime">
- <h3>addRuntime<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function addRuntime(name:String, obj:Object):void</code>
- <div class="memberDescription">Adds a specific upload runtime like for example flash or gears.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">name:String</td>
- <td class="last">Runtime name for example flash.</td>
- </tr>
- <tr>
- <td class="first">obj:Object</td>
- <td class="last">Object containing init/destroy method.</td>
- </tr>
- </table>
- </div>
- <div class="memberDetails" id="cleanName">
- <h3>cleanName<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function cleanName(s:String):String</code>
- <div class="memberDescription">Cleans the specified name from national characters (diacritics). The result will be a name with only a-z, 0-9 and _.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">s:String</td>
- <td class="last">String to clean up.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">String - Cleaned string.</div>
- </div>
- <div class="memberDetails" id="extend">
- <h3>extend<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function extend(target:Object, obj:Object..):Object</code>
- <div class="memberDescription">Extends the specified object with another object.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">target:Object</td>
- <td class="last">Object to extend.</td>
- </tr>
- <tr>
- <td class="first">obj:Object..</td>
- <td class="last">Multiple objects to extend with.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">Object - Same as target, the extended object.</div>
- </div>
- <div class="memberDetails" id="formatSize">
- <h3>formatSize<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function formatSize(size:Number):String</code>
- <div class="memberDescription">Formats the specified number as a size string for example 1024 becomes 1 KB.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">size:Number</td>
- <td class="last">Size to format as string.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">String - Formatted size string.</div>
- </div>
- <div class="memberDetails" id="getPos">
- <h3>getPos<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function getPos(node:Element, root:Element):object</code>
- <div class="memberDescription">Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">node:Element</td>
- <td class="last">HTML element or element id to get x, y position from.</td>
- </tr>
- <tr>
- <td class="first">root:Element</td>
- <td class="last">Optional root element to stop calculations at.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">object - Absolute position of the specified element object with x, y fields.</div>
- </div>
- <div class="memberDetails" id="guid">
- <h3>guid<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function guid():String</code>
- <div class="memberDescription">Generates an unique ID. This is 99.99% unique since it takes the current time and 5 random numbers.
- The only way a user would be able to get the same ID is if the two persons at the same exact milisecond manages
- to get 5 the same random numbers between 0-65535 it also uses a counter so each call will be guaranteed to be page unique.
- It's more probable for the earth to be hit with an ansteriod. You can also if you want to be 100% sure set the plupload.guidPrefix property
- to an user unique key.
- </div>
- <h4>Returns</h4>
- <div class="returns">String - Virtually unique id.</div>
- </div>
- <div class="memberDetails" id="parseSize">
- <h3>parseSize<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function parseSize(size:String/Number):Number</code>
- <div class="memberDescription">Parses the specified size string into a byte value. For example 10kb becomes 10240.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">size:String/Number</td>
- <td class="last">String to parse or number to just pass through.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">Number - Size in bytes.</div>
- </div>
- <div class="memberDetails" id="toArray">
- <h3>toArray<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function toArray(obj:Object):Array</code>
- <div class="memberDescription">Forces anything into an array.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">obj:Object</td>
- <td class="last">Object with length field.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">Array - Array object containing all items.</div>
- </div>
- <div class="memberDetails last" id="xmlEncode">
- <h3>xmlEncode<span class="memberType">method</span>
- </h3>
- <code class="syntax">public static
- function xmlEncode(s:String):String</code>
- <div class="memberDescription">Encodes the specified string.
- </div>
- <h4>Parameters</h4>
- <table class="params">
- <tr>
- <td class="first">s:String</td>
- <td class="last">String to encode.</td>
- </tr>
- </table>
- <h4>Returns</h4>
- <div class="returns">String - Encoded string.</div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|