Created
August 8, 2011 00:24
-
-
Save matiasmm/1130981 to your computer and use it in GitHub Desktop.
markdown preview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installation | |
============ | |
In client side, include this between the header tags: | |
<link rel="stylesheet" type="text/css" media="screen" href="jQueryMediaUploader.css" /> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript" src="jQueryMediaUploader.js"></script> | |
<script typepe="text/javascript"> | |
MediaUploader.Store.urls = { | |
list: 'url_to_the_action_that_list_files.json', | |
upload: 'url_to_the_action_to_upload_a_single_file.json', | |
delete: 'url_to_the_action_to_delete_a_single_file.json', | |
}; | |
</script> | |
The you can use it. Usage Example: | |
__HTML__ | |
<!-- Again, i'm supposing you are editing --> | |
<input type="hidden" class="group" name="file_id[]" value="1"> | |
<input type="hidden" class="group" name="file_id[]" value="2"> | |
<script> | |
MediaUploader.FileSelector(".group", { | |
multiple: true, | |
categories: ['guitars', 'drums', 'cities', 'top models'] | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment