1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace|storage] fixing typo in large file upload documentation; updated large file upload to work with ruby 1.8.7

This commit is contained in:
Kyle Rames 2013-06-04 09:24:37 -05:00
parent 266d8c8dfb
commit 566038ea29
2 changed files with 4 additions and 4 deletions

View file

@ -396,7 +396,7 @@ Cloud Files requires files larger than 5 GB to be uploaded into segments along w
end
# write manifest file
service.put_object_manifest("my_container", "large_file", 'X-Object-Manifest' => "my_container/large_file")
service.put_object_manifest("my_container", "large_file", 'X-Object-Manifest' => "my_container/large_file/")
Segmented files are downloaded like ordinary files. See [Download Files](#download-files) section for more information.

View file

@ -61,7 +61,7 @@ file_name = get_user_input "Enter full path of file to upload"
segment_name = File.basename(file_name)
File.open(file_name) do |f|
num_segments = (f.size / SEGMENT_LIMIT).round + 1
num_segments = (f.stat.size / SEGMENT_LIMIT).round + 1
puts "\nThis upload of '#{file_name}' will require #{num_segments} segment(s) and 1 manifest file\n"
@ -94,9 +94,9 @@ You should now be able to download #{segment_name} from the cloud control panel
directory = service.directories.get('#{directory.key}')
File.open('downloaded_#{segment_name}', 'w') do | f |
directory.files.get(#{segment_name}) do | data, remaining, content_length |
directory.files.get('#{segment_name}') do | data, remaining, content_length |
print "."
f.syswrite data
f.write data
end
end