Uppy: Help integrating a custom plugin

Created on 22 Nov 2018  路  2Comments  路  Source: transloadit/uppy

Hi,

I'm currently using Uppy through NPM. I've got it installed and running and I've created a new plugin that shows images from a stock image website.

The thing is, should I rebuild the library in order to get it working with my custom plugin? Do I have another way to do it? It's the first time that I'm doing this and I'm a little bit lost to be honest. This plugin has it's js file, obviously, and also a css.

By the way, we're using aurelia as framework, so we might get rid of preact. How could I render it using another framework?

Thank you so much

Most helpful comment

You can't change that Uppy is rendered using Preact, but it should still integrate fine with Aurelia. The public Uppy API only uses raw DOM elements (except inside custom plugins).

If you've created a custom plugin class that extends from Plugin, you can uppy.use() it like any other plugin, eg:

import CustomPlugin from './MyCustomPlugin'
uppy.use(CustomPlugin, { /* options */ })

CSS should be included in the same way that you include other CSS files. With webpack you'd probably use css-loader and import syntax, but that depends on your build setup

All 2 comments

You can't change that Uppy is rendered using Preact, but it should still integrate fine with Aurelia. The public Uppy API only uses raw DOM elements (except inside custom plugins).

If you've created a custom plugin class that extends from Plugin, you can uppy.use() it like any other plugin, eg:

import CustomPlugin from './MyCustomPlugin'
uppy.use(CustomPlugin, { /* options */ })

CSS should be included in the same way that you include other CSS files. With webpack you'd probably use css-loader and import syntax, but that depends on your build setup

Thank you so much, it's finally working.

Was this page helpful?
0 / 5 - 0 ratings