Chunked upload

First version. Could probably use a test and such...