custom doc upload bug