Medusa plugins
U

Upload gcs

A starter for Medusa plugins.

Need customizations for this plugin?

Get in touch
npm install @lodashventure/medusa-upload-gcs
Category
other
Built by
lodashventure
Type
unknown
Last updated
3 weeks ago

Medusa Plugin File-GCS

How to install

  1. yarn add medusa-upload-gcs

  2. configure your medusa backend

module.exports = defineConfig({
// ... rest of the config
modules: [
// ... rest of the modules
{
resolve: "@medusajs/medusa/file",
options: {
providers: [
{
resolve: "medusa-upload-gcs/providers/file-gcs",
id: "gcs",
options: {
credentials: {
client_email: process.env.CLIENT_EMAIL,
private_key: process.env.PRIVATE_KEY,
},
privateBucketName: process.env.BUCKET_NAME,
publicBucketName: process.env.BUCKET_NAME,
basePublicUrl: process.env.GCP_STORAGE_BASE_PUBLIC_URL,
},
},
],
},
},
],
});
  1. add variables to .env
  1. all done now just start your medusa backend or whatever you use to start your backend