Don't save uploaded archive to /tmp, just use a pipe. Also, rewrite how we do ajax requests to stop using JQuery's awful API and start reporting errors reasonably.