Skip to content

Instantly share code, notes, and snippets.

@kenperkins
Created February 28, 2014 21:07
Show Gist options
  • Save kenperkins/9279951 to your computer and use it in GitHub Desktop.
Save kenperkins/9279951 to your computer and use it in GitHub Desktop.
Output cdnUri for files in a CDN CloudFiles Container
var pkgcloud = require('pkgcloud');
var client = pkgcloud.providers.rackspace.storage.createClient({
// as appropriate
});
client.getContainer(process.argv[2], function (err, container) {
client.getFiles(container.name, function(err, files) {
files.forEach(function (f) {
console.log(container.cdnUri + '/' + f.name);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment