'Delete an uploaded file and the corresponding import job
@param upload_id: the upload ID'

def delete_job(self, upload_id):

    db = current.db
    request = self.request
    resource = request.resource
    job_id = self.job_id
    if job_id:
        result = resource.import_xml(None, id=None, tree=None, job_id=job_id, delete_job=True)
    count = db((self.upload_table.id == upload_id)).delete()
    db.commit()
    result = count
    if (result == False):
        current.response.warning = self.messages.no_job_to_delete
    else:
        current.response.confirmation = self.messages.job_deleted
    self.next = request.url(vars=dict())
