From d00ec4555f81210cd067f98d9bc7cef51f456462 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 7 Jun 2008 00:28:49 +0200 Subject: 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 --- lib/exe/mediamanager.php | 16 ++++++++++++++++ lib/exe/multipleUpload.swf | Bin 0 -> 64353 bytes 2 files changed, 16 insertions(+) create mode 100644 lib/exe/multipleUpload.swf (limited to 'lib/exe') 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 @@ = 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 new file mode 100644 index 000000000..6921cbb45 Binary files /dev/null and b/lib/exe/multipleUpload.swf differ -- cgit v1.2.3