waz-storage 0.5.8 → 0.5.81
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/waz/blobs/container.rb +2 -0
- data/lib/waz/storage/version.rb +1 -1
- metadata +1 -1
data/lib/waz/blobs/container.rb
CHANGED
@@ -114,6 +114,7 @@ module WAZ
|
|
114
114
|
# the required <em>content_type</em>. <strong>The <em>options</em> parameters if provided
|
115
115
|
# will set the default metadata properties for the blob</strong>.
|
116
116
|
def store(blob_name, payload, content_type, options = {})
|
117
|
+
blob_name.gsub!(%r{^/}, '')
|
117
118
|
self.class.service_instance.put_blob("#{self.name}/#{blob_name}", payload, content_type, options)
|
118
119
|
return BlobObject.new(:name => blob_name,
|
119
120
|
:url => self.class.service_instance.generate_request_uri("#{self.name}/#{blob_name}"),
|
@@ -124,6 +125,7 @@ module WAZ
|
|
124
125
|
# it will return nil instead of throwing an exception.
|
125
126
|
def [](blob_name)
|
126
127
|
begin
|
128
|
+
blob_name.gsub!(%r{^/}, '')
|
127
129
|
properties = self.class.service_instance.get_blob_properties("#{self.name}/#{blob_name}")
|
128
130
|
return BlobObject.new(:name => blob_name,
|
129
131
|
:url => self.class.service_instance.generate_request_uri("#{self.name}/#{blob_name}"),
|
data/lib/waz/storage/version.rb
CHANGED