Skip to content

Commit 5c55f19

Browse files
author
David Hajčiar
committed
Fallback to size if we can't use bytesize
1 parent 61bc0bc commit 5c55f19

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/azure_blob/client.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,11 @@ def put_blob_single(key, content, options = {})
408408
end
409409

410410
def content_size(content)
411-
content.bytesize
411+
if content.respond_to?(:bytesize)
412+
content.bytesize
413+
else
414+
content.size
415+
end
412416
end
413417

414418
def host

0 commit comments

Comments
 (0)