Method: Baidu::PCS::Client#create_super_file
- Defined in:
- lib/baidu/pcs/client.rb
#create_super_file(block_list, path, overwrite = false) ⇒ Hash
合并分片文件
与分片文件上传 #upload_block 方法配合使用,可实现超大文件(>2G)上传,同时也可用于断点续传的场景
208 209 210 211 212 213 214 |
# File 'lib/baidu/pcs/client.rb', line 208 def create_super_file(block_list, path, overwrite=false) raise ArgumentError, 'block_list must be Array' unless block_list.instance_of? Array raise ArgumentError, 'block_list size must be in 2..1024' unless block_list.length.between? 2, 1024 query = build_upload_query 'createsuperfile', path, overwrite param = { block_list: block_list } post "#{BASE_PATH}/file", query, param: JSON.dump(param) end |