Cannot upload media files

default discord avatar
etmartinkazoo
3 weeks ago
5

Hi all we are having difficulty uploading media files on the Payload cloud; we cannot figure out why and have never had this issue before. The code is below:


import { CollectionConfig } from "payload/types";

export const Media: CollectionConfig = {
  slug: "media",
  upload: {
    staticURL: "/media",
    staticDir: "media",
    imageSizes: [
      {
        name: "thumbnail",
        width: 400,
        height: 300,
        position: "centre",
      },
      {
        name: "card",
        width: 768,
        height: 1024,
        position: "centre",
      },
      {
        name: "tablet",
        width: 1024,
        height: undefined,
        position: "centre",
      },
    ],
    adminThumbnail: "thumbnail",
    mimeTypes: ["image/*"],
  },
  fields: [
    {
      name: "alt",
      type: "text",
    },
  ],
};
  • discord user avatar
    denolfe
    Payload Team
    3 weeks ago
    we are having difficulty uploading media files on Payload cloud

    What is the issue? Can you provide more info to troubleshoot? What error are you seeing? When are you seeing it? You indicate it was working before. Did you upgrade anything?

  • default discord avatar
    etmartinkazoo
    3 weeks ago

    Hi Elliot, we are not even able to deploy vanilla projects now. We are getting the following error:

    CleanShot_2023-11-09_at_09.09.292x.png
  • discord user avatar
    denolfe
    Payload Team
    3 weeks ago

    Okay, I believe this has been reported. Looks like a dependency issue within the Payload cloud plugin. Looking into this now.



    What version of plugin-cloud are you using?



    I haven't been able to recreate this. Any extra info would be helpful.



    I was able to recreate this issue. It appears to be due to a downstream dependency. Issue being tracked here:

    https://github.com/payloadcms/payload/issues/4109
  • discord user avatar
    seanzubrickas
    Payload Team
    2 weeks ago

    Thanks for digging into this @denolfe

  • discord user avatar
    denolfe
    Payload Team
    2 weeks ago

    @etmartinkazoo A workaround has been added to that issue. Add the following to your package.json:



    "resolutions": {
      "jackspeak": "2.1.1"
    }
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.