} else {
job = new SFTPExportJob(TaskJobHandler.getUserId(request), localFile, host, port, new Path(remotePath), user, passphrase, options);
}
job.schedule();
TaskInfo task = job.getTask();
JSONObject result = task.toJSON();
//Not nice that the import service knows the location of the task servlet, but task service doesn't know this either
URI requestLocation = ServletResourceHandler.getURI(request);
URI taskLocation = new URI(requestLocation.getScheme(), requestLocation.getAuthority(), "/task/temp/" + task.getId(), null, null); //$NON-NLS-1$
result.put(ProtocolConstants.KEY_LOCATION, taskLocation);
response.setHeader(ProtocolConstants.HEADER_LOCATION, ServletResourceHandler.resovleOrionURI(request, taskLocation).toString());