Skip to content

Is it possible to drag and drop directly on UploadButton #530

Closed Answered by MikeiLL
jacob-minca asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, @yoavniran.

Amazing work. Thank you.

Hope I'm not incurring on your SciFi writing here with my spam.

Ultimate, I would love to have a DropZone which supports Drag or Click, like in React DropZone.

Current approach, following your suggestion here, is to include a <UploadButton> and a <span>, toggling between them on dropzone.drag-over:

<Uploady
    destination={{ url: upload_url + "&doctype=" + selectedDocType }}
>
    <UploadDropZone
        className="dropzone"
        onDragOverClassName="drag-over"
    >
        <UploadButton>Drag files or click here to upload.</UploadButton>
        <span>Drag files or click here to upload.</span>
    </UploadDropZone>
</Uploady>
.dropzone {
    a…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jacob-minca
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants