Created
February 28, 2014 21:07
-
-
Save kenperkins/9279951 to your computer and use it in GitHub Desktop.
Output cdnUri for files in a CDN CloudFiles Container
This file contains hidden or 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
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