handle big files

It might happen that multiple buffers are sent on a push. This fixes the buffered array not being available after the first buffer was received