strapi-plugin-content-export-import icon indicating copy to clipboard operation
strapi-plugin-content-export-import copied to clipboard

Added CSV file support [API, ImportForm]

Open zulmehdi opened this issue 5 years ago • 4 comments
trafficstars

Hi @lazurey, I was looking for a way to bulk import data into our CMS, and the closest working plugin was yours. Thank you for making it, and saving us some time :)

However, our requirement was to import the data from CSV files, and thus this modification to both the form and the API:

Form

I have allowed the form to accept both .csv and .json files, and added a small "detour" to the form when a CSV file is imported. Basically, the imported CSV is first converted to an object, and the normal workflow resumes.

API

The API now checks for files passed along the form-data, specifically with "source" filed name, and once it finds it, it converts the CSV or JSON data into object, and replaces toe original request's body with the newly created object. This modification is to allow for the resumption of the original workflow.

I have tried to follow your style as much as possible, modify as little formatting as possible, and have not used any dependency, to have as fewer changes as possible, while adding a powerful feature (at least to me :))

Thought others might use this feature, too.

Please do reach out if there are any issues.

Regards, Zul

zulmehdi avatar Jun 05 '20 16:06 zulmehdi

Thanks @lazurey I'll update the request at the earliest, according to your feedback.

Regards, Zul

zulmehdi avatar Jun 10 '20 12:06 zulmehdi

Hey guys, is this still under development? Do we need someone to take over from here? I'd volunteer to do that since this is an important feature for us.

ribeirojose avatar Apr 09 '21 13:04 ribeirojose

Hey guys, is this still under development? Do we need someone to take over from here? I'd volunteer to do that since this is an important feature for us.

I think you can go ahead, since it's long time no update. Or you could fork the repo and add any feature you need.

lazurey avatar Apr 21 '21 03:04 lazurey

Hey guys, is this still under development? Do we need someone to take over from here? I'd volunteer to do that since this is an important feature for us.

How is it going? Did you decide to create a new plugin? I am working on the same issue atm in our project.

nekrasovp avatar May 10 '21 15:05 nekrasovp