Skip to content

Instantly share code, notes, and snippets.

@matiasmm
Created August 8, 2011 00:24
Show Gist options
  • Save matiasmm/1130981 to your computer and use it in GitHub Desktop.
Save matiasmm/1130981 to your computer and use it in GitHub Desktop.
markdown preview
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