Skip to content

Instantly share code, notes, and snippets.

@stomita
Created December 25, 2013 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stomita/8121053 to your computer and use it in GitHub Desktop.
Save stomita/8121053 to your computer and use it in GitHub Desktop.
Include view link in file list.
function updateFileList() {
bucket.listObjects({}, function(err, resp) {
if (err) { throw err; }
$('#fileList').empty();
$.each(resp.Contents, function(i, content) {
var viewLink = $('<a href="#" class="view-link">').text(content.Key);
$('<li>').data('key', content.Key)
.append(viewLink)
.appendTo($('#fileList'));
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment