'Verify that the upload is a valid zip file that contains a
manifest.json file.'

def validate_file(self, file_obj):

    if (file_obj.content_type not in self.valid_content_types):
        self.error('BAD_CONTENT_TYPE')
    try:
        self.zipfile = SafeUnzip(file_obj)
        try:
            self.zipfile.is_valid()
        except ValidationError as e:
            raise ParseError(unicode(e))
        except (BadZipfile, IOError):
            self.error('INVALID_ZIP')
        manifest = self.zipfile.extract_path('manifest.json')
    except KeyError:
        self.error('NO_MANIFEST')
    return manifest
