X Enterprises
Forms

FormUploadImage

Drag-and-drop image upload with preview.

Forms

Enhanced form components for uploads, rich text editing, and search inputs.

Components

<XAFormUploadImage />

Drag-and-drop image upload with preview.

<XAFormUploadImage
  v-model="imageUrl"
  :upload-url="'/api/upload/image'"
  accept="image/*"
  :max-size-mb="5"
/>

Props

PropTypeDefaultDescription
modelValuestring''Current image URL via v-model; updated after a successful upload
uploadUrlstringrequiredPOST endpoint that receives the image as multipart/form-data
acceptstring'image/*'MIME type filter for the file picker
maxSizeMbnumber5Maximum allowed file size in megabytes

AI Context

component: XAFormUploadImage
package: "@xenterprises/nuxt-x-app"
category: Form
use-when: Admin forms requiring image uploads with drag-and-drop and preview
upload-pattern: requires upload-url prop pointing to POST endpoint, emits update:modelValue with the uploaded image URL
Copyright © 2026