Update upload function to use 1MB chunks.