-
Notifications
You must be signed in to change notification settings - Fork 0
SWFUpload
Category:Libraries::External | Category:Libraries::Tranfsers
[h3]SWFUpload with CI 1.5x.[/h3] SWFUpload is a small JavaScript/Flash library to get the best of both worlds. It features the great upload capabilities of Flash and the accessibility and ease of HTML/CSS. [url=http://swfupload.org/documentation/demonstration]See it in action[/url].
- Upload multiple files at once by ctrl/shift-selecting in dialog
- Javascript callbacks on all events
- Get file information before upload starts
- Style upload elements with XHTML and css
- Display information while files are uploading using HTML
- No page reloads necessary
- Works on all platforms/browsers that has Flash support.
- Degrades gracefully to normal HTML upload form if Flash or javascript is unavailable
- Control filesize before upload starts
- Only display chosen filetypes in dialog
- Queue uploads, remove/add files before starting upload
[h3]Usage[/h3] In your view file, include the SWFUpload javascript file: [code]<script type="text/javascript" src="jscripts/SWFUpload/mmSWFUpload.js"></script>[/code] In your controller, pass "Filedata" as the name value for the do_upload function: [code]$this->upload->do_upload('Filedata')[/code] In your mimes.php file, add 'application/octet-stream' for all allowed image formats [code]'gif' => array('image/gif', 'application/octet-stream'), 'jpeg' => array('image/jpeg', 'image/pjpeg', 'application/octet-stream'), 'jpg' => array('image/jpeg', 'image/pjpeg', 'application/octet-stream'), 'jpe' => array('image/jpeg', 'image/pjpeg', 'application/octet-stream'), 'png' => array('image/png', 'image/x-png', 'application/octet-stream'),[/code]
That's it!
- Slith The Seventh Letter / Iron Eye