#Trying to add image is getting "Invalid request: Field 'images, 0, url' is required "

1 messages · Page 1 of 1 (latest)

kind mist
#

My current medusa.config.ts

loadEnv(process.env.NODE_ENV || 'development', process.cwd())

module.exports = defineConfig({
  projectConfig: {
    databaseUrl: process.env.DATABASE_URL,
    http: {
      storeCors: process.env.STORE_CORS!,
      adminCors: process.env.ADMIN_CORS!,
      authCors: process.env.AUTH_CORS!,
      jwtSecret: process.env.JWT_SECRET || "supersecret",
      cookieSecret: process.env.COOKIE_SECRET || "supersecret"
    }
  },
  admin: {
    vite: () => {
      return {
        server: {
          allowedHosts: ["mydomain.com", "shop.mydomain.com", "b2c.mydomain.com"],
        },
      }
    },
  },
  modules: [
    {
      resolve: "@medusajs/medusa/payment",
      options: {
        providers: [
          {
            resolve: "@medusajs/medusa/payment-stripe",
            id: "stripe",
            options: {
              apiKey: process.env.STRIPE_API_KEY,
              webhookSecret: process.env.STRIPE_WEBHOOK_SECRET,
              capture: true,
            },
          },
        ]
      }
    }
  ],
  plugins: [
    {
      resolve: "@medusajs/file-local",
      options: {
        upload_dir: "uploads/images",  // Directory where files will be stored
        backend_url: "https://b2c.mydomain.com", // Replace with your backend URL
      }
    },
  ],
})```
rich star
#

did u use the uploadFilesWorkflow?

kind mist
#

this wound up being a max filesize issue. Caused by my nginx reverse proxy not having a max body size entry