Framework Components

Vue

Integrate PichaFlow into your Vue and Nuxt applications.

The @pichaflow/vue package provides a reactive upload component.

Usage

<script setup>
import { PichaUpload } from '@pichaflow/vue';

const onUploadSuccess = (response) => {
  console.log('Uploaded:', response.url);
};
</script>

<template>
  <PichaUpload
    api-key="pk_live_..."
    :use-secure="true"
    signature-url="/api/media/v1/upload/sign"
    :tags="['hero', 'banner']"
    @success="onUploadSuccess"
  />
</template>

Props

PropTypeDefaultDescription
apiKeystringRequiredYour PichaFlow Public Key (pk_live_...). Use Secret Key only in trusted backend apps.
useSecurebooleanfalseEnable the HMAC-SHA256 handshake flow for secure browser uploads.
signatureUrlstringundefinedThe endpoint on your backend that signs the upload request (Required if useSecure is true).
baseUrlstringhttps://api.pichaflow.comOptional API base URL.
tagsstring[][]Tags to apply to the upload.

Events

EventPayloadDescription
successUploadResponseFired when upload completes successfully.
erroranyFired on network or server errors.
progressnumberFired during upload progress updates.