Bulk upload in Plone 5 with Archetypes folder

Hi,

I was wondering if the new bulk upload form located under folder_contents works with folders which were created as Archetypes? Or is a full Dexterity migration required before hand?

I'm currently getting the following error when trying to upload an image into a pre-existing Archetype folder:

Traceback (innermost last):
  Module ZPublisher.Publish, line 70, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.app.content.browser.file, line 159, in __call__
TypeError: ('Could not adapt', <ATFolder at /plone/contentimages>, <InterfaceClass Products.ATContentTypes.interfaces.factories.IATCTFileFactory>)

Hi Adam,

That's weird, that code path explicitly provides Archetypes compatibility.

Hi @gyst,

I thought so as well, so I was a bit surprised by the error.
I wanted to do the Plone 5 upgrade in two steps, with the Archetypes -> Dexterity coming later and this is the only Archetype related error I am getting.

Oh, I thought the canonical upgrade path is to do AT->DX with plone.app.contenttypes on the latest Plone4, before then doing Plone4->Plone5. Any special reasons for going to Plone5 with AT?

Hi everyone, I've seen many posts on the community talking about this, but it seems, no one has the answer:

I have the same issue and tried many things, none of them working. The fact is that in either a migrated or new site in Plone 5.x with Archetypes installed the upload widget is not working, throwing the Adapt error.

Can anyone throw light on this?
Thanks.

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:

I've just tried it! Not working, the problem is in line 161 not in 156.
The Folders are not DX they're old Archetypes.
Migrating folders to dexterity works.
But in my case, unfortunately, that's not an option. And looking in the code comments as @gyst says, its meaned to work---

Someone please file a GitHub issue about this (if there isn't one)