Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Cannot upload media files

default discord avatar
etmartinkazoolast year
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
    last year
    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
    etmartinkazoolast year

    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
    last year

    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
    12 months ago

    Thanks for digging into this @denolfe

  • discord user avatar
    denolfe
    12 months ago

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



    "resolutions": {
      "jackspeak": "2.1.1"
    }
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team..