Skip to content

Migrating from ghl-ui Upload to HighRise Upload

This guide explains how to move from UIUpload to HighRise HLUpload. HighRise keeps the same UploadFileInfo[] model, switches binding to v-model:file-list, and adds inline/button trigger options.

Component Implementation Changes

Import Changes

diff
- import { UIUpload } from '@gohighlevel/ghl-ui'
+ import { HLUpload } from '@platform-ui/highrise'

Basic Usage Changes

diff
- <UIUpload :fileList="files" @change="handleChange" />
+ <HLUpload
+   id="file-upload"
+   v-model:file-list="files"
+   accept="image/*"
+   @change="handleChange"
+ />

Props Changes

ghl-ui PropHighRise PropNotes
fileListv-model:file-listSame UploadFileInfo[] payload; two-way binding uses the file-list model
multiplemultipleSame behavior
maxmaxMax file count
typetypedraggable (default) or button; HighRise also supports inline
buttonPropsbutton-propsPassed to the internal HLButton when type="button"
showDownloadButtonshow-download-buttonShows download action in the list
acceptacceptSame MIME filter
disableddisabledSame behavior
onDownloadon-downloadOverride default download; also emits download
inlineNew inline trigger; pairs with the built-in HLUploadList

Examples

Drag-and-drop Upload

vue
<template>
  <HLUpload id="profile-upload" v-model:file-list="files" accept="image/*">
    <template #extra>
      <div class="flex flex-col items-center gap-1 text-gray-600">
        <span class="font-medium text-blue-600">Click to upload</span>
        <span>or drag and drop PNG/JPG</span>
      </div>
    </template>
  </HLUpload>
</template>

<script setup>
import { ref } from 'vue'
import { HLUpload } from '@platform-ui/highrise'

const files = ref([])
</script>

Button-trigger Upload

vue
<template>
  <HLUpload
    id="invoice-upload"
    type="button"
    v-model:file-list="files"
    :button-props="{ variant: 'primary', size: 'md' }"
    :show-download-button="true"
    @download="handleDownload"
  >
    <template #buttonContent>Upload invoice</template>
  </HLUpload>
</template>

<script setup>
import { ref } from 'vue'
import { HLUpload } from '@platform-ui/highrise'

const files = ref([])

const handleDownload = file => {
  // optional custom download
  console.log('download', file)
}
</script>

Inline Upload

vue
<template>
  <HLUpload id="inline-upload" inline v-model:file-list="files" :max="3">
    <template #inlineUploadLabelText>Attach files</template>
  </HLUpload>
</template>

<script setup>
import { ref } from 'vue'
import { HLUpload } from '@platform-ui/highrise'

const files = ref([])
</script>

Best Practices

  1. Prefer v-model:file-list update cycles stay in sync.
  2. Use type="button" when you need a button-only trigger; keep draggable for drop-zones.
  3. Provide accept and max to set clear upload constraints.
  4. Use on-download + @download to plug in custom download flows.
  5. Disable the control while uploads are in-flight to avoid duplicate selections.

Additional Notes

  1. Emits change, remove, update:file-list, and download (when on-download is supplied).
  2. Exposes clear(), submit(), and openFileDialog() via refs for advanced control.
  3. Uses the built-in HLUploadList to render the list consistently across variants.