Skip to content
Snippets Groups Projects
Commit 8e52497e authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-4097 send-attachment: Override contentLength

parent 12881e42
Branches
Tags
1 merge request!15Ozg 4097 senden und empfangen von anhängen
...@@ -25,6 +25,13 @@ public record FileChunkInfo( ...@@ -25,6 +25,13 @@ public record FileChunkInfo(
public InputStream getInputStream() { public InputStream getInputStream() {
return new LimitedInputStream(fileInputStream, CHUNK_SIZE); return new LimitedInputStream(fileInputStream, CHUNK_SIZE);
} }
@Override
public long contentLength() {
return chunkIndex == upload.numberOfChunks() - 1
? upload.file().getSize() % CHUNK_SIZE
: CHUNK_SIZE;
}
}; };
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment