#Export products with minio

2 messages · Page 1 of 1 (latest)

dim lance
#

I have followed the instructions here https://docs.medusajs.com/plugins/file-service/minio to a T.

I am able to export products locally. They are placed in my remote minio bucket.

Nothing is different code wise or MINIO .env settings between dev and prod but in prod once I start the job I get no errors and it just sits there.

Are there any temporary directories I might need to change permissions on? I am running this on linux in production but windows locally.

Images upload just fine.

Learn how to integrate MinIO with the Medusa backend. Learn how to install the MinIO plugin on the Medusa backend and configure it.

wooden cobalt
#

This is not a direct answer to your question. But I'm very curious about the rationale to make the export functionality produce a a csv file that has to be uploaded via a storage plugin, and if a medusa team member drops by, maybe they could share their thoughts.

There are frequently questions about this functionality, and I personally have never gotten it to work. (I can usually get an export, but then that file will not import without errors.) The approach has many potential points of failure.

I feel like I may be missing something, but why not just return a bunch of json directly to the browser? Maybe the concern is running out of memory with lots of products. Is there a way to use a stream and buffering to avoid that? It also seems to me like json could be ingested more easily by medusa. For large imports, you could break the json up into multiple files. Or the export could produce a file in the same structure as seed.json, to leverage existing functionality in medusa-cli.

Anyway, I bring all this up here, because it seems like there is a need for a new admin widget for export/import, but I don't want to go down that path if certain approaches were already considered and avoided for good reasons.