Newsletter 2 | 25.09.2024
We’re back from our summer break!
All about Payload is back. Our most recent video shows you how to deploy Payload + a MongoDB Database together on Coolify.
The V3 Website building series will continue on Monday the 30th
Lock documents while being edited
You can now lock documents for other users while you are editing them. This is as easy as adding
lockDocuments: {
duration: 100, // duration in seconds to keep it locked after last user input
}
to your collection config.
This will show a lock in the collection table and a popup for other users that try to access that document:
You can “take over” editing a document while its locked, this will show a popup for the previous user letting him know you took over
Import Maps & NextJS dev server performance
Since Beta 96, Payload install size & package size has been reduced remarkably by removing depencies.
It also now uses Import Maps to bring down compile times during development, which is still an issue that the new serverless architecture entails. We’ve seen <10 seconds for a fresh start and <5 seconds for cached compilations, which is pretty good!
Payload info command
“pnpm payload info” will output important information about your project, such as
Binaries:
Node: 18.20.2
npm: 10.5.0
Yarn: 1.22.19
pnpm: 9.7.0
Relevant Packages:
payload: 3.0.0-beta.91
next: 15.0.0-canary.104
@payloadcms/db-mongodb: 3.0.0-beta.91
@payloadcms/db-postgres: 3.0.0-beta.91
@payloadcms/email-nodemailer: 3.0.0-beta.91
@payloadcms/graphql: 3.0.0-beta.91
@payloadcms/next/utilities: 3.0.0-beta.91
@payloadcms/plugin-cloud: 3.0.0-beta.91
@payloadcms/richtext-lexical: 3.0.0-beta.91
@payloadcms/richtext-slate: 3.0.0-beta.91
@payloadcms/translations: 3.0.0-beta.91
@payloadcms/ui/shared: 3.0.0-beta.91
react: 19.0.0-rc-06d0b89e-20240801
react-dom: 19.0.0-rc-06d0b89e-20240801
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020
Available memory (MB): 32768
Available CPU cores: 12
Upload hasMany + Bulk Upload
Since Beta 89, Payload comes equipped with bulk upload and a hasMany option on upload fields.
Until now, to handle e.g. an array of product images, you’d have to create an array field, with a nested upload field, adding each image one by one
Now, an upload field can have multiple elements, essentially saving an array of upload elements. You can upload/select multiple elements at ones and easily change order through drag n drop.
To bulk upload multiple files, go to your upload collection, and at the top of the table click “bulk upload”
And that’s it for now! We’re grateful for any constructive feedback, so please reach out to info@10xmedia.de if you’re missing something