Created
December 25, 2013 07:54
-
-
Save stomita/8121170 to your computer and use it in GitHub Desktop.
Upload file, using prefix.
This file contains 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
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