bytescale / bytescale-upload-widget-react

Beautiful File Upload Component | Developed for React by Bytescale
https://www.bytescale.com/docs/upload-widget/react
MIT License
73 stars 2 forks source link

Customizable Dropzone #5

Closed titusgahissy closed 1 year ago

titusgahissy commented 1 year ago

Hello, I'm following up on issue #2.

  1. Is it possible to customize this preview screen? Instead of showing a generic icon and the filename, maybe the actual uploaded image. Developers should be able to do that through a render or parameterized children props
Screenshot 2023-04-25 at 11 04 29
ljwagerfield commented 1 year ago

This would be an excellent feature!

We've also received interest in displaying custom progress (e.g. horizontal bars, instead of the circles we use currently).

The challenge is that React Uploader is a simple wrapper for Uploader, which is a plain JavaScript library.

The Uploader library is also extended by several other framework wrappers that we maintain (see below).

Each framework wrapper provides a very similar API, and we really want to keep it this way.

Thus, the solution we choose essentially needs to be supported by 5 these libraries:

So whilst it's possible, I think it starts to get a little complicated, given the interop between each framework wrapper and the "plain JS" base component (which incidentally is written in Preact).

ljwagerfield commented 1 year ago

In general -- and because of the above -- we try to solve these issues by supporting the specific feature the user is after natively, rather than allowing areas of the component to accept arbitrary HTML.

In this case, it sounds like you want image thumbnails (instead of a generic icon)?

If so, we can certainly look into adding this.

titusgahissy commented 1 year ago

I opened the issue because I wanted to create the following UI that uses a grid instead of a list.

Screenshot 2023-04-26 at 00 17 01
ljwagerfield commented 1 year ago

Thanks for sharing :)

I don't think we'll be at a point (any time soon) where we can support UI changes as significant as this.

If you'd like to build a completely bespoke upload UI, you can use Upload.js to handle file uploading, progress reporting, and cancellation.

It's a headless library, so you'd need to build the UI for yourself.

titusgahissy commented 1 year ago

Makes sense. I will explore this approach.