Skip to content

Instantly share code, notes, and snippets.

@stomita
Created December 25, 2013 07:54
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/8121170 to your computer and use it in GitHub Desktop.
Save stomita/8121170 to your computer and use it in GitHub Desktop.
Upload file, using prefix.
function uploadFile(files) {
if (files && files.length > 0) {
var file = files[0];
var params = { Key: getPrefix() + file.name, ContentType: file.type, Body: file };
bucket.putObject(params, function(err, resp) {
updateFileList();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment