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

Create Additional Event? #28

Open
GroovySquirl opened this issue Oct 7, 2013 · 0 comments
Open

Create Additional Event? #28

GroovySquirl opened this issue Oct 7, 2013 · 0 comments

Comments

@GroovySquirl
Copy link

I want to be able to trigger an additional event after the files have been uploaded. For example, after I upload an XML file, I would like to be able to hit a "Load Data" button which will take the file and do some stuff with it on the server side.

I have the GUI setup properly, and I added a few entries to filehandler.js and uploadhandler.js

image

//FILEHANDLER.js
handler.on('loadAction', function (fileName) {
        middleware.emit('load', fileName);
    });

//UPLOAD HANDLER.JS
.on('loadAction', function (e) {
            self.emit('load', e);
        })

I'm looking to do something like the below via the Middleware:

upload.on('loadAction', function (fileName) {
        console.log("Loading File: " + fileName);
        //some custom business logic here
    });

I'm not sure how to go about making this tweak... but it WOULD be a nice feature for the middleware down the road :)

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

1 participant