Permalink
Browse files

- added option timeLimit and updated docs

  • Loading branch information...
1 parent 1fad5fe commit af2379220a4bb59eded480a9c881e8e9ec375a05 Harald Kirschner committed May 25, 2009
View
@@ -16,10 +16,10 @@ Features {#features}
* Cancel running uploads, add files during upload
* Everything is optional, documented and easy editable
* New in 2.0
- * Get the server response after upload for showing additional informations or previewing the image, etc.
- * Shows the current upload speed and the time left
- * Send additional request data via GET or POST variables
- * Set the filename for the upload request
+ * Get the server response after upload for showing additional informations or previewing the image, etc.
+ * Shows the current upload speed and the time left
+ * Send additional request data via GET or POST variables
+ * Set the filename for the upload request
* New in 3.0 (Completely rewritten API)
* Fully Flash 9 and 10 compatible and an additional IFrame-based uploader
* Browse-button can be an invisible overlay or an interactive image sprite
@@ -73,15 +73,18 @@ Documentation {#docs}
* verbose: (*boolean*: defaults to false) Debug mode, logs messages and all events from Flash during development (using *console.info*).
* target: (*element*: defaults to null) If given, the browse-element is overlayed with a transparent movie. The Events *click/mouseenter/mouseleave/disabled* are fired as events on *target*.
* zIndex: (*number*: defaults to 9999) Only used if a *target* is given, this sets the z-index for the overlay.
-* buttonImage: (*string*: defaults to null) Sprite for the upload button, has to have 4 states vertical aligned: Normal, hovered, clicked and disabled. Make sure to adapt the options *width* and *height*.
+* buttonImage: (*string*: defaults to null) Sprite for the upload button, has to have 4 states vertically aligned: Normal, hovered, clicked and disabled. Make sure to adapt the options *width* and *height*.
+* policyFile: (*string*: defaults to null) Location the cross-domain policy file. See [Flash Security.loadPolicyFile](http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/Security.html#loadPolicyFile%28%29).
* url: (*string*: defaults to null) URL to the server-side script (relative URLs are changed automatically to absolute paths).
* method: (*string*: defaults to 'post') If the method is 'get', *data* is appended as query-string to the URL. The upload will always be a POST request.
* data: (*object|string*: defaults to null) Key/data values that are sent with the upload requests.
* mergeData: (*boolean*: defaults to true) If true, the *data* option from uploader and file is merged (prioritised file data).
* fieldName: (*string*: defaults to "Filedata") The key of the uploaded file on your server, similar to *name* in a file-input. Linux Flash ignores it, better avoid it.
* fileSizeMin: (*number*: defaults to 1) Validates the minimal size of a selected file *byte*.
-* fileSizeMax: (*number*: defaults to 0) Validates the maximal size of a selected file (official limit is 100 MB for FileReference)
+* fileSizeMax: (*number*: defaults to 0) Validates the maximal size of a selected file (official limit is 100 MB for FileReference, I tested up to 2 GB)
* allowDuplicates: (*boolean*: defaults to false) Validates that no duplicate files are added.
+* timeLimit: (*number*: default 30, 0 for linux) Timeout in seconds. If the upload is without progress, it is cancelled and event `complete` gets fired (with error string `timeout`). Occurs usually when the server sends an empty response (also on redirects).
+* fileList: (*boolean*: defaults to false) Validates that no duplicate files are added.
* fileListMax: (*number*: defaults to 0) Validates the overall file count.
* fileListSizeMax: (*number*: defaults to 0) Validates the overall file size in *byte*.
* instantStart: (*boolean*: defaults to false) If true, the upload starts right after a successful file selection.
View
@@ -25,7 +25,7 @@
* Only needed if you have a logged in user, see option appendCookieData,
* which adds session id and other available cookies to the sent data.
*
- * session_name('SID'); // whatever your session name is, adapt that!
+ * session_id($_POST['SID']); // whatever your session name is, adapt that!
* session_start();
*/
@@ -3,11 +3,11 @@
*
* Updated to latest 3.0 API. Hopefully 100% compat!
*
- * @version 3.0 rc1
+ * @version 3.0
*
* @license MIT License
*
- * @author Harald Kirschner <mail [at] digitarald [dot] de>
+ * @author Harald Kirschner <http://digitarald.de>
* @copyright Authors
*/
@@ -1,7 +1,7 @@
/**
* FancyUpload.Attach - Flash meets Ajax for powerful and elegant uploads.
*
- * @version 3.0 rc1
+ * @version 3.0 rc3
*
* @license MIT License
*
@@ -1,11 +1,12 @@
/**
* Swiff.Uploader - Flash FileReference Control
*
- * @version 3.0 rc1
+ * @version 3.0
*
* @license MIT License
*
- * @author Harald Kirschner <mail [at] digitarald [dot] de>
+ * @author Harald Kirschner <http://digitarald.de>
+ * @author Valerio Proietti, <http://mad4milk.net>
* @copyright Authors
*/
@@ -42,8 +43,9 @@ Swiff.Uploader = new Class({
fieldName: null,
fileSizeMin: 1,
- fileSizeMax: null, // Official limit is 100 MB for FileReference!
+ fileSizeMax: null, // Official limit is 100 MB for FileReference, but I tested up to 2Gb!
allowDuplicates: false,
+ timeLimit: (Browser.Platform.linux) ? 0 : 30,
buttonImage: null,
policyFile: null,
@@ -230,6 +232,7 @@ Swiff.Uploader = new Class({
fileSizeMin: this.options.fileSizeMin,
fileSizeMax: this.options.fileSizeMax,
allowDuplicates: this.options.allowDuplicates,
+ timeLimit: this.options.timeLimit,
buttonImage: this.options.buttonImage,
policyFile: this.options.policyFile
});
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.

2 comments on commit af23792

@Head
Head commented on af23792 Nov 6, 2014

Thank you @digitarald for this great upload. Here you have a free coffee from me @changetip

@changetip

Hi digitarald, Head sent you a Bitcoin tip worth 1 coffee (4,305 bits/$1.50), and I'm here to deliver it ➔ collect your tip at ChangeTip.com.

Is this real?

Please sign in to comment.