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

Unable to get the uploaded response #18

Closed
suriyagp opened this issue May 24, 2019 · 6 comments
Closed

Unable to get the uploaded response #18

suriyagp opened this issue May 24, 2019 · 6 comments

Comments

@suriyagp
Copy link

Once after the upload i need to get the response of the upload request to proceed further. that is available in the normal ng-flow but not in ngx-flow

@MartinNuc
Copy link
Collaborator

I will take a look into it.

@MartinNuc
Copy link
Collaborator

@suriyagp can you please point me how do you do it with ng-flow or preferably with flow.js?

@tahir-jamil
Copy link

any updates

@MartinNuc
Copy link
Collaborator

Point me please to docs how to do it using ng-flow or flow.js.

@hpwd
Copy link

hpwd commented Aug 7, 2019

i'm watching the fileError event and read the request message like this:

ngAfterViewInit() {

    this.autoUploadSubscription = this.flow.events$.subscribe(event => {

        if (event.type === 'filesSubmitted') {
            this.flow.upload();
        }

        if (event.type === 'fileError') {
            let response = JSON.parse( event.event[2].xhr.response );
            console.log( response.message );
            this.flow.cancel();
        }

    });
}

@MartinNuc
Copy link
Collaborator

Closing this issue. Solved by @hpwd

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

4 participants