Skip to content
Snippets Groups Projects
Commit fb4a9066 authored by juanf's avatar juanf
Browse files

13253 : Bugfix upload chunks instead of empty chunks

parent 1cae32ae
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -173,12 +173,13 @@ public class OpenBISAPI {
httpRequest.param("startByte", Long.toString(start));
httpRequest.param("endByte", Long.toString(end));
httpRequest.param("size", Long.toString(file.length()));
httpRequest.content(new BytesContentProvider(chunk));
final ContentResponse response = httpRequest.send();
final int status = response.getStatus();
if (status != 200) {
throw new IOException(response.getContentAsString());
}
start += CHUNK_SIZE;
}
} catch (final IOException | TimeoutException | InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment