Bulk upload in Plone 5 with Archetypes folder

I replied by mistake on the other issue:

@adam.castle's issue is that the folder fti is a dx one, but the object is still not migrated.

Changing:

if IDexterityFTI.providedBy(getattr(pt, type_)):

with:

if IDexterityFTI.providedBy(getattr(pt, type_)) and IDXFileFactory(self.context, None):

may work.

The other option is to migrate the folders to dexterity: