excid3 / uppy-activestorage-upload

Rails ActiveStorage DirectUploads engine for Uppy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't see the status bar after upgrading to 3.x

luctus opened this issue · comments

Hello there!

I'm not sure if this is an issue on my end or not, but I can't see the status bar after upgrading to Uppy 3.

The image gets uploaded perfectly fine, but the status (progress) bar is not there, the <div class="uppy-StatusBar is-waiting"> is there in the dashboard, but with no content on it.

Here is my code:

import { Controller } from "@hotwired/stimulus"

import Uppy from '@uppy/core'
import Dashboard from '@uppy/dashboard'
import Webcam from '@uppy/webcam'
import ActiveStorageUpload from '@excid3/uppy-activestorage-upload'

export default class extends Controller {
  static values = { }

  connect() {
    const directUploadUrl = document.querySelector('meta[name="direct-upload-url"]').content
    let uppy = new Uppy({
      autoProceed: true,
      allowMultipleUploads: false,
      restrictions: {
        maxNumberOfFiles: 1,
        maxFileSize: 51200000,
        allowedFileTypes: ['image/*', 'application/pdf']
      }
    })
    .use(Dashboard, {
      target: '.files-zone',
      inline: true,
      proudlyDisplayPoweredByUppy: false,
      showSelectedFiles: false,
      height: 300
    })
    .use(Webcam, {
      target: Dashboard,
      modes: ['picture']
    })
    .use(ActiveStorageUpload, {
      directUploadUrl
    })
    .on('complete', (result) => {
      ...
    })
  }
}

BTW, I just tested the example controller (and HTML) and I have exactly the same issue...

@luctus, hi! Upload progress broke with Uppy 3.8.0. Not sure why though, release notes don't seem to help. I'll be using 3.7.0 for now (which is @uppy/core 3.1.1 and @uppy/dashboard 3.3.1).

Hey @puglet5! Thanks for your answer. I've been studying your fork for the whole day :)

I tried with these versions:

    ...
    "@excid3/uppy-activestorage-upload": "https://github.com/excid3/uppy-activestorage-upload",
    "@uppy/core": "^3.1.1",
    "@uppy/dashboard": "^3.3.1",
    "@uppy/webcam": "^3.3.0",
    ...

And I can see the in the logs that the progress events are being triggered, look:
image

But still, the same problem. The progress bar "tries" to appear for 1ms and then it's gone.

Did these versions work for you?

Oh, How silly. I had to remove the ^ in the versions and it worked.

Thanks a lot.

Yep, otherwise yarn/npm installs latest major version. Glad to help!

I'll look into getting this plugin up to date with latest Uppy.