Just a quick question that I can't seem to find an answer for on my own or through searching online. Currently, I have a button set up for clicking and uploading files. However, I also want to incorporate drag and drop functionality using the same framework and function at the same time. This is the code I'm working with:
<div flow-init flow-name="uploader.flow" flow-files-submitted="uploadFiles()"
flow-file-success="fileUploaded()">
<label for="file-upload" class="upload">Files</label>
<input id="file-upload" type="file" flow-btn>
I am trying to utilize the 'uploader.flow' scope for both drag and drop, while still executing 'uploadFiles()' upon submission. Here's what I've attempted:
<div flow-init flow-object="...??..." flow-drop
flow-files-submitted="uploadFiles()" flow-file-success="fileUploaded()" ></div>
I suspect that the issue lies in determining what should be placed in the flow-object. It seems too simple of a fix, so I may be missing something related to the new initialization process. Is there a certain step that needs to be taken?
Alternatively, could it work better to identify a shared parent element and initialize the functionality there instead of separately? Or would this approach be ineffective?