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:
https://northflank.com/guides/deploying-payload-cms#common-issuesStar
Discord
online
Get help straight from the Payload team with an Enterprise License.