feat: bulk upload (#7800)
## Description Adds bulk upload functionality to upload enabled configs. You can disable the ability by defining `upload.bulkUpload: false` in your upload enabled config. - [x] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository. ## Type of change - [x] New feature (non-breaking change which adds functionality) ## Checklist: - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] Existing test suite passes locally with my changes - [ ] I have made corresponding changes to the documentation
This commit is contained in:
@@ -120,6 +120,7 @@ export const sanitizeCollection = async (
|
||||
// disable duplicate for uploads by default
|
||||
sanitized.disableDuplicate = sanitized.disableDuplicate || true
|
||||
|
||||
sanitized.upload.bulkUpload = sanitized.upload?.bulkUpload ?? true
|
||||
sanitized.upload.staticDir = sanitized.upload.staticDir || sanitized.slug
|
||||
sanitized.admin.useAsTitle =
|
||||
sanitized.admin.useAsTitle && sanitized.admin.useAsTitle !== 'id'
|
||||
|
||||
@@ -95,6 +95,11 @@ export type UploadConfig = {
|
||||
* - A function that generates a fully qualified URL for the thumbnail, receives the doc as the only argument.
|
||||
**/
|
||||
adminThumbnail?: GetAdminThumbnail | string
|
||||
/**
|
||||
* Enables bulk upload of files from the list view.
|
||||
* @default true
|
||||
*/
|
||||
bulkUpload?: boolean
|
||||
/**
|
||||
* Enables cropping of images.
|
||||
* @default true
|
||||
|
||||
Reference in New Issue
Block a user