Etheryte / vue-auto-dropzone

A Dropzone component for Vue. Typescript support, native slots, and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Can we add files programmatically, without the browser dialogue interface?

e0lithic opened this issue · comments

Hi,

Is there a way where we can add files to vue-dropzone through code ( without the browser dialogue for drag and drop), so that it automatically starts uploading and triggering all success and error events.

I explored the existing methods but the addFile seems to only create a mock file for display and doesn't initiate the auto upload events.

I am considering a usecase where we generate dataUrl on the fly from a webcam ( selfies ) which are then added to the dropzone for subsequent uploads automatically.

Please correct me if I am missing something. Or there are alternate ways to achieve the same.

Thanks

This is one of those instances where different use cases expect different defaults. For clarity, the next release will feature a new method addAndUploadFile() with identical params that also fires upload hooks.

A new release is available on NPM. Please reopen this issue if there are further problems with the outlined solution.