Hi Gayrat,
I figured I was still on my own here
I wont repeat everything I explained so far, sad I can’t seem to express myself well enough so you understand what I’m trying to achieve here
So I went ahead, started from scratch and wrote the plugin by following the tutorial (without using any code from the jbeuckm repo), adjusting along the way to make it work with the latest and greatest Strapi version. I wrote everything as functional components and hooks, no more class components and traditional react lifecycle handling.
To start off with the bad news: no matter what I’ve tried, I can’t seem to get the media import feature to work as expected. If you would still be able to investigate why, I’d appreciate a lot! More info down below.
The good news:
I managed to get the import to work with the i18n features in a way I can import a single record holding values in multiple languages, translating that to an internal linked list of records (as that’s how Strapi handles translations). I even added some language detection in the UI based on the import field names to ease the pain of selecting 8*x language dropdowns during testing with 8 languages
The amazing news:
I managed to import relations as well. Even on localized models. WIth optional creation of missing related records. Select the related record field to match, the separator to use,
The unbelievable news
I added options to allow updating existing records instead of creating new ones so I can re-import the same files and update records along the way. I mainly need this to handle better import files and update custom content parsing methods.
The approach is very optimistic, there’s still tons of things to improve, re-organize, etc etc, but so far it’s working for me. Somehow it’s very slow on large imports: as soon as I try with import files containing hundreds of records, analysing takes very long and crashes eventually.
Feel free to have a look at it here on Github:
The part specifically for the media import is here: and here’s the link to the section in the original blog post as well, documenting the approach:
I hope someone can still help with the media import. I’m afraid though that this topic has become a one-on-one conversation with no solution and no further involvement from others…