added bufferDataSize, moved upload worker