jQuery upload function.