Update upload.pl

Partial working - needs work to resolve edit issues