diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-06-07 00:28:49 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-06-07 00:28:49 +0200 |
commit | d00ec4555f81210cd067f98d9bc7cef51f456462 (patch) | |
tree | b9e42451c57ff91dadd2423bb550603de6f52ef8 /lib/exe | |
parent | 09c2d803ca738992288c138eab41f35008e3e3df (diff) | |
download | rpg-d00ec4555f81210cd067f98d9bc7cef51f456462.tar.gz rpg-d00ec4555f81210cd067f98d9bc7cef51f456462.tar.bz2 |
experimental Flash based multi upload
This patch adds experimental support for uploading multiple files in one go.
This is achieved by using Flash for selecting multiple images and intitiating
the HTTP upload.
When Flash 8 or higher is detected, an additional icon is added to the usual
upload form. Clicking it will swith the form to the Flash based upload queue.
Things that need work:
* Better Icon
* Feedback if Flash detection works on all Flash 8 supported platforms
* Progress feedback seems not to work on Linux (might be Adobe bug)
* No final feedback how many images were uploaded correctly
The flash sources are located in lib/_fla/
Any feedback and help would be appreciated.
darcs-hash:20080606222849-7ad00-738083445af275752aaebc29bfa51430f3d94459.gz
Diffstat (limited to 'lib/exe')
-rw-r--r-- | lib/exe/mediamanager.php | 16 | ||||
-rw-r--r-- | lib/exe/multipleUpload.swf | bin | 0 -> 64353 bytes |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index 32849be62..c3754d309 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -1,6 +1,8 @@ <?php if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); define('DOKU_MEDIAMANAGER',1); + + require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/lang/en/lang.php'); require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); @@ -13,6 +15,7 @@ // handle passed message if($_REQUEST['msg1']) msg(hsc($_REQUEST['msg1']),1); + if($_REQUEST['err']) msg(hsc($_REQUEST['err']),-1); // get namespace to display (either direct or from deletion order) @@ -37,6 +40,19 @@ // create the given namespace (just for beautification) if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$NS:xxx", 'media'); } + // handle flash upload + if($_FILES['Filedata']['tmp_name']){ + $_FILES['upload'] =& $_FILES['Filedata']; + $JUMPTO = media_upload($NS,$AUTH); + if($JUMPTO == false){ + header("HTTP/1.0 400 Bad Request"); + echo 'Upload failed'; + } + echo 'ok'; + exit; + } + + // handle upload if($_FILES['upload']['tmp_name']){ $JUMPTO = media_upload($NS,$AUTH); diff --git a/lib/exe/multipleUpload.swf b/lib/exe/multipleUpload.swf Binary files differnew file mode 100644 index 000000000..6921cbb45 --- /dev/null +++ b/lib/exe/multipleUpload.swf |