index.ts 682 B

12345678910111213141516171819202122
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import createInput from '#shared/form/core/createInput.ts'
  3. import FieldFileInput from '#mobile/components/Form/fields/FieldFile/FieldFileInput.vue'
  4. import { filesSizeError } from './features/filesSizeError.ts'
  5. import { filesTypeError } from './features/filesTypeError.ts'
  6. import { multipleFilesError } from './features/multipleFilesError.ts'
  7. const fieldDefinition = createInput(
  8. FieldFileInput,
  9. ['multiple', 'capture', 'accept', 'allowedFiles'],
  10. {
  11. features: [multipleFilesError, filesSizeError, filesTypeError],
  12. },
  13. )
  14. export default {
  15. fieldType: 'file',
  16. definition: fieldDefinition,
  17. }