Problems with content Upload after Migration from Plone 4.3.10 to Plone 5.0.5

Is this happening on migrated folders or also on new folders (or whatever your type is).
This is subtle...

This line checks if the folder fti (or whatever is your type) is a dexterity one:

But your objects may be still an archetype object.

if you change:

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

with:

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

it may work.

If it works, you can migrate your existing objects:

Do we already have an issue opened for this topic?