Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] Check type on `.createContainer()`

  • Loading branch information...
commit 16193e2d59c98842659a2d9fecbc588025e2268a 1 parent 2b4f9fb
@indexzero indexzero authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/cloudfiles/core.js
View
6 lib/cloudfiles/core.js
@@ -112,14 +112,14 @@ Cloudfiles.prototype.getContainer = function () {
};
Cloudfiles.prototype.createContainer = function (container, callback) {
- var self = this;
- utils.rackspace('PUT', this.storageUrl(container.name), this, callback, function (body, res) {
+ var self = this, containerName = container instanceof cloudfiles.Container ? container.name : container;
+ utils.rackspace('PUT', this.storageUrl(containerName), this, callback, function (body, res) {
if (typeof container.cdnEnabled !== 'undefined' && container.cdnEnabled) {
container.ttl = container.ttl || self.config.cdn.ttl;
container.logRetention = container.logRetention || self.config.cdn.logRetention;
var cdnOptions = {
- uri: self.cdnUrl(container.name),
+ uri: self.cdnUrl(containerName),
method: 'PUT',
client: self,
headers: {
Please sign in to comment.
Something went wrong with that request. Please try again.