Fix #632: Make sure StreamChannels is enabled in rest/client.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This commit is contained in:
Hector Sanjuan 2019-01-07 14:05:30 +01:00
parent 99638cddb2
commit 596c1f5096
2 changed files with 9 additions and 5 deletions

View File

@ -428,6 +428,9 @@ func (c *defaultClient) AddMultiFile(
headers := make(map[string]string)
headers["Content-Type"] = "multipart/form-data; boundary=" + multiFileR.Boundary()
// This method must run with StreamChannels set.
params.StreamChannels = true
queryStr := params.ToQueryString()
// our handler decodes an AddedOutput and puts it

View File

@ -448,11 +448,12 @@ func TestAddMultiFile(t *testing.T) {
Name: "test something",
ShardSize: 1024,
},
Shard: false,
Layout: "",
Chunker: "",
RawLeaves: false,
Hidden: false,
Shard: false,
Layout: "",
Chunker: "",
RawLeaves: false,
Hidden: false,
StreamChannels: true,
}
out := make(chan *types.AddedOutput, 1)