Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Click Open FileUpload Dialog available? #176

Open
ZeroQool007 opened this issue Sep 17, 2015 · 1 comment
Open

Button Click Open FileUpload Dialog available? #176

ZeroQool007 opened this issue Sep 17, 2015 · 1 comment

Comments

@ZeroQool007
Copy link

Can i click a button do open the file upload dialog?

@barbeque
Copy link

I had the same problem and the documentation wasn't extremely clear on it. What worked was something like this:

<div class="row" id="doc-uploader">
    <h1>Upload Documents</h1>
    <div id="upload-drop-target">
        <p>Drag here to upload</p>
    </div>
    <input type="file" id="drop-fallback" />
</div>

[...]

<script>
$('#upload-drop-target').filedrop({
                fallback_id: 'drop-fallback',
                fallback_dropzoneClick: true,
</script>

The key here was that the fallback element had to be a file (as jquery-filedrop listens to the change event) and not a button.

Hope this helps, although it has been nearly four years so I also hope you weren't waiting all this time for the answer. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants