EdisonPeM / strapi-plugin-import-export-content

Csv and Json import / export content plugin to Strapi
https://www.npmjs.com/package/strapi-plugin-import-export-content
MIT License
146 stars 66 forks source link

Import to Users Collection #20

Closed ardiansyaherwin closed 3 years ago

ardiansyaherwin commented 3 years ago

Hi,

does the plugin support importing CSV to users collection?

I've installed the plugin and created a sample csv file containing a user data to be added.

But I dont know how to use it, since the Import Destination only shows Single Types collection.

any advice?

EdisonPeM commented 3 years ago

Hi @ardiansyaherwin

At the moment it only supports importing user collections types or single types, because I did not consider importing data about other strapi plugins.

If you want, you can extends it modifying the useContentTypes hook to not filter the content-types, for this, you can copy a file of this hook from node_modules/strapi-plugin-import-export-content/admin/src/hooks/useContentTypes.js to extensions/import-export-content/admin/src/hooks/useContentTypes.js

and change from

const contentTypes = data.filter(({ uid }) => uid.startsWith("application::"));

To this

const contentTypes = data;

For more info o customize a plugin click here

ardiansyaherwin commented 3 years ago

Hi @EdisonPeM

Sorry I don't get it, you just said that it only supports importing Users collections types or single types. But in my case, the Users collections is not showing on Import Destination options.

Did I miss any config?

Screen Shot 2021-06-19 at 13 45 52
EdisonPeM commented 3 years ago

sorry for the mistake. I meant that it only supports collections created by the user, that is, created by a developer.

Users collection is a collection created from a user-permission plugin. that's why it has no support

ardiansyaherwin commented 3 years ago

oh I see, thanks a lot for such a quick response. I'll try your suggestion by extending the plugin. have a nice day!