Skip to content

Plugin only works with very old and obsolete versions of UppyΒ #20

@andrew-connell

Description

@andrew-connell

Uppy's plugin architecture changed years ago. I started to try and update this plugin but realised it's much easier to just use @uppy/xhr-upload

This is all that's required:

import Uppy from '@uppy/core'
import XHR from '@uppy/xhr-upload'
const uppy=new Uppy({ debug: true })
 .use(XHR, {endpoint: IMAGEKIT_URL_ENDPOINT})
  .on('file-added', (file) => {
    fetch(ENDPOINT).then((response) => response.json()).then((data) => {
      uppy.setFileMeta(file.id, {
        fileName: file.name,
        publicKey: IMAGEKIT_PUBLIC_KEY,
        signature: data.signature,
        expire: data.expire,
        token: data.token,
      })
    })
  })

It now works perfectly and is future proof. I'm not sure this plugin is necessary at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions