#TypeError: Cannot read properties of undefined (reading 'mime')
3 messages · Page 1 of 1 (latest)
@slow kestrel Can we check out your upload collection?
ModalFile.ts
import { CollectionConfig } from "payload/types";
import path from "path";
const ModelFile: CollectionConfig = {
slug: "modalfile",
admin: {},
upload: {
staticDir: path.resolve(__dirname, "../../modal"),
},
fields: [],
};
export default ModelFile;
const modalfile = await payload.create({
collection: "modalfile",
data: {},
filePath: lpath,
});