Quintagroup.transmogrifier problems with non-binary files

61 Views Asked by At

I was trying to export and import a Plone site with quintagroup.transmogrifier. I was having a bit of a problem with the File items: when the File item contained a binary file (like a zip or a png) the File item exported successfully. But when the File item had a non-binary file (like a txt, csv or ODT) the item exported, but the file within was lost.

So I looked up the binary.py module with the code for the fileexporter blueprint. It seems like the blueprint looks the fields from the Schema of the item, and if there is a binary field, it understands the item is either a File or an Image and so it exports the file within.

But it fails in those cases I mentioned (File items with non-binary files).

So my question is: how can it be detected, in Python, whether the field in the Schema contains a binary file or a text file?

0

There are 0 best solutions below