#Image previews not showing in Medusa Admin

1 messages · Page 1 of 1 (latest)

wanton schooner
#

any idea could i make it work with the private link too?

#

maybe i've set the api incorrectly, but i have no idea what could be wrong
i just pasted the values from the dashboard

#

from what it seems, it just cant access the image without any authentication

plain rune
#

do you have the correct key you're passing ?

#

dont use cloudflare, but use supabase s3 and i had to setup a key that had access to this bucket specifically.

wanton schooner
#

yeah i have 'S3_SECRET_ACCESS_KEY' and 'S3_ACCESS_KEY_ID'

pure lantern
#

Can You share your medusa-config.ts?

wanton schooner
# pure lantern Can You share your medusa-config.ts?

of course

import { loadEnv, defineConfig } from "@medusajs/framework/utils";

loadEnv(process.env.NODE_ENV || "development", process.cwd());

module.exports = defineConfig({
  projectConfig: {
    databaseUrl: process.env.DATABASE_URL,
    redisUrl: process.env.REDIS_URL!,
    http: {
      storeCors: process.env.STORE_CORS!,
      adminCors: process.env.ADMIN_CORS!,
      authCors: process.env.AUTH_CORS!,
      jwtSecret: process.env.JWT_SECRET,
      cookieSecret: process.env.COOKIE_SECRET,
    },
  },
  modules: [
    {
      resolve: "@medusajs/medusa/event-bus-redis",
      options: {
        redisUrl: process.env.REDIS_URL,
      },
    },
    {
      resolve: "@medusajs/medusa/file",

      options: {
        providers: [
          {
            resolve: "@medusajs/medusa/file-s3",

            id: "s3",

            options: {
              file_url: process.env.S3_FILE_URL,
              access_key_id: process.env.S3_ACCESS_KEY_ID,
              secret_access_key: process.env.S3_SECRET_ACCESS_KEY,
              region: process.env.S3_REGION,
              bucket: process.env.S3_BUCKET,
              endpoint: process.env.S3_ENDPOINT,
            },
          },
        ],
      },
    },
    {
      resolve: "@medusajs/medusa/locking",

      options: {
        providers: [
          {
            resolve: "@medusajs/medusa/locking-redis",
            id: "locking-redis",
            is_default: true,
            options: {
              redisUrl: process.env.REDIS_URL,
            },
          },
        ],
      },
    },
  ],
});
pure lantern
#

Okay everything looks okay there, assuming your .env doesn't have any typos for the S3 env variables. In your db, how do the thumbnail urls look like in the product table? Could you share one?