So I'm using `@payloadcms/plugin-cloud-storage` an...

default discord avatar
Payload-Bot
last month
6

So I'm using

@payloadcms/plugin-cloud-storage

and when doing this in 1.0.19:


const storageAdapter = s3Adapter({
  config: {
    endpoint: process.env.NEXT_PUBLIC_S3_API_ENDPOINT,
    region: process.env.S3_REGION,
    forcePathStyle: true,
    credentials: {
      accessKeyId: process.env.S3_ACCESS_KEY_ID as string,
      secretAccessKey: process.env.S3_SECRET_ACCESS_KEY as string,
    },
  },
  bucket: process.env.NEXT_PUBLIC_S3_BUCKET as string,
  acl: "public-read",
});
console.log(storageAdapter);

I get a function as storageAdapter but doing it in

1.1.1

I just get a empty object, so seems like

1.1.1

is broken? Has the way initing a storageAdapter changed?



Original message from @livog - Moved from https://discord.com/channels/967097582721572934/967097582721572937/1162376402792882176 (in #general)
  • discord user avatar
    denolfe
    Payload Team
    last month

    @livog Nothing should have changed. Let me. Look into this. What version of Payload are you running?

  • default discord avatar
    livog
    last month

    Running

    2.0.5


    Running with:


    admin: {
        user: Users.slug,
        bundler: viteBundler(),
      },
    editor: lexicalEditor({}),
      db: postgresAdapter({
        pool: {
          connectionString: process.env.DATABASE_URL,
        },
      }),

    if that makes any difference

  • default discord avatar
    _mm__
    last month

    @denolfe - experiencing a similar thing - the adapter is an empty object. I'm on



    payload@2.0.6

    and

    @payloadcms/plugin-cloud-storage@1.1.1

    and using the viteBundler

    Screen_Shot_2023-10-16_at_9.35.28_AM.png
  • discord user avatar
    denolfe
    Payload Team
    last month

    If you swap to the webpack bundler, does it still occur?

  • default discord avatar
    _mm__
    last month

    @denolfe - yup, have switched and adapter error disappears. good enough to get up and running again thanks!

  • discord user avatar
    denolfe
    Payload Team
    last month
Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.