Skip to content

Commit

Permalink
Merge pull request #2 from ZhuyiHome/chunk-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
xingxing committed Jul 18, 2017
2 parents ea0af70 + 0707607 commit 19a2b7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/qiniu/chunk_upload.ex
Expand Up @@ -44,11 +44,11 @@ defmodule Qiniu.ChunkUpload do
end

def send_block([chunk | rest], block_size, opts, uptoken) do
with %HTTPoison.Response{body: %{"ctx" => ctx, "host" => host}}
<- mkblk(chunk, opts, uptoken, block_size) do
send_chunk(rest, 1, ctx, uptoken, host)
else
error -> error
case mkblk(chunk, opts, uptoken, block_size) do
%HTTPoison.Response{body: %{"ctx" => ctx, "host" => host}} ->
send_chunk(rest, 1, ctx, uptoken, host)
error ->
error
end
end

Expand Down

0 comments on commit 19a2b7a

Please sign in to comment.