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

How to hide the input element and trigger the file upload with another control #862

Open
VosWouter87 opened this issue Feb 25, 2019 · 1 comment

Comments

@VosWouter87
Copy link

VosWouter87 commented Feb 25, 2019

Using a custom upload button and/or drag-n-drop area and custom upload function
When trying to implement this control into my site, I get the following error: 'TypeError: "Uploader" must be an instance of FileUploader'
When I can't use the provided uploader.
I've tried using the FileUploader, this doesn't help.
After choosing a file, my ng-model value hasn't changed, and thus my ng-change event won't trigger.

I've tried making a JSFiddle to demonstrate this, but it keeps failing with the error "Error: [$injector:nomod] Module 'app' is not available!"
When I've clearly registered app with:

var app = angular.module('app', [
    'angularFileUpload'
]);

When using the code on my site it does properly change the file name on the control itself. If I leave the control visible. But I can't use the default file upload button and want it to remain hidden. Instead I need a custom upload button and function.

I'm using version 2.5.0 of the control

@ygj6
Copy link
Collaborator

ygj6 commented Dec 10, 2019

@VosWouter87 You can refer to the ygj6@dc92cb7. It supports custom upload buttons and also supports dragging files.
Hope that can help you.

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