diff --git a/apps/www/src/lib/registry/new-york/example/AutoForm.vue b/apps/www/src/lib/registry/new-york/example/AutoForm.vue
index 8273821d..ebc35eb5 100644
--- a/apps/www/src/lib/registry/new-york/example/AutoForm.vue
+++ b/apps/www/src/lib/registry/new-york/example/AutoForm.vue
@@ -153,6 +153,9 @@ const onSubmit = handleSubmit((values) => {
bio: {
component: 'textarea',
},
+ file: {
+ component: 'file',
+ },
subObject: {
diff --git a/apps/www/src/lib/registry/new-york/ui/auto-form/AutoForm.vue b/apps/www/src/lib/registry/new-york/ui/auto-form/AutoForm.vue
index 01782fb7..ab3e5c6a 100644
--- a/apps/www/src/lib/registry/new-york/ui/auto-form/AutoForm.vue
+++ b/apps/www/src/lib/registry/new-york/ui/auto-form/AutoForm.vue
@@ -57,7 +57,7 @@ const shapes = computed(() => {
/>
- {{ shape.schema }}
+
diff --git a/apps/www/src/lib/registry/new-york/ui/auto-form/AutoFormField.vue b/apps/www/src/lib/registry/new-york/ui/auto-form/AutoFormField.vue
index f1ecf07b..de85628f 100644
--- a/apps/www/src/lib/registry/new-york/ui/auto-form/AutoFormField.vue
+++ b/apps/www/src/lib/registry/new-york/ui/auto-form/AutoFormField.vue
@@ -18,7 +18,7 @@ defineProps<{
+import { beautifyObjectName } from '../utils'
+import type { Config } from '../interface'
+import AutoFormLabel from '../AutoFormLabel.vue'
+import { FormControl, FormDescription, FormField, FormItem, FormMessage } from '@/lib/registry/new-york/ui/form'
+import { Input } from '@/lib/registry/new-york/ui/input'
+
+defineProps<{
+ name: string
+ required?: boolean
+ config?: Config
+}>()
+
+async function parseFileAsString(file: File | undefined): Promise {
+ return new Promise((resolve, reject) => {
+ if (file) {
+ const reader = new FileReader()
+ reader.onloadend = () => {
+ resolve(reader.result as string)
+ }
+ reader.onerror = (err) => {
+ reject(err)
+ }
+ reader.readAsDataURL(file)
+ }
+ })
+}
+
+
+
+
+
+
+ {{ config?.label || beautifyObjectName(name) }}
+
+
+ {
+ const file = (ev.target as HTMLInputElement).files?.[0]
+ const parsed = await parseFileAsString(file)
+ componentField.onInput(parsed)
+ }"
+ />
+
+
+ {{ config.description }}
+
+
+
+
+