Enable to upload images on prod / Nordflank

default discord avatar
4 months ago

Hi there!

Locally, I am able to use media without problems.

import path from 'path'; import type { CollectionConfig } from 'payload/types'; const Media: CollectionConfig = { slug: 'media', upload: { staticURL: '/uploads', staticDir: '../uploads', // Specify the size name that you'd like to use as admin thumbnail adminThumbnail: 'thumbnail', imageSizes: [ { height: 400, width: 400, crop: 'center', name: 'thumbnail', }, { width: 900, height: 450, crop: 'center', name: 'sixteenByNineMedium', }, ], }, fields: [], }; export default Media;

However, when I try to upload a file on prod deployed on Nordflank, I guess the following error:

You are not allowed to perform this action.

Fixed by reading:

    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!


    Connect with the Payload Community on Discord



    Can't find what you're looking for?

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