Skip to content

Property 'dropzone' is private and only accessible within class 'HSFileUpload'. #448

Closed
@ryanpantk

Description

@ryanpantk

Summary

Unable to access dropzone property to observe events in Nextjs Typescript Project

Steps to Reproduce

  1. Set up preline and HSFileUpload component according to stackblitz below
  2. Tried to add this part of the code in the documentation
    `const { element } = HSFileUpload.getInstance('#hs-file-upload', true);
    const { dropzone } = element;

dropzone.on('complete', () => {
console.log('Item uploaded!');
});`

Demo Link

https://stackblitz.com/edit/preline-v2-nextjs-fmp5tr?file=src%2Fapp%2Fcomponents%2FPrelineScript.tsx

Expected Behavior

Console log "item uploaded!" when the file is uploaded

Actual Behavior

Error Property 'dropzone' is private and only accessible within class 'HSFileUpload'.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions