Can it support setting callbacks like onCompleteItem by options by not extending uploader class? #311

Open
opened 2016-07-18 01:47:34 +00:00 by tom10271 · 3 comments
tom10271 commented 2016-07-18 01:47:34 +00:00 (Migrated from github.com)

As title,

new FileUploader({
    onCompleteItem: () => {}
});
As title, ``` new FileUploader({ onCompleteItem: () => {} }); ```
anshumansworld commented 2016-07-26 08:31:03 +00:00 (Migrated from github.com)

can we also include onAfterAddingFile?

can we also include `onAfterAddingFile`?
arins commented 2017-01-13 10:07:55 +00:00 (Migrated from github.com)

should also give response data like this


new FileUploader({
    onCompleteItem: (item: any,
                response: string,
                status: number,
                headers: any) => {}
});

should also give response data like this ``` new FileUploader({ onCompleteItem: (item: any, response: string, status: number, headers: any) => {} }); ```
arins commented 2017-01-13 10:08:36 +00:00 (Migrated from github.com)

I can add you can hijak the uploader by

uploader.onCompleteItem = (item: any,
                response: string,
                status: number,
                headers: any) => {
                // your code
                return { item, response, status, headers };
            };
I can add you can hijak the uploader by ``` uploader.onCompleteItem = (item: any, response: string, status: number, headers: any) => { // your code return { item, response, status, headers }; }; ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#311