after item on queue #103

Open
opened 2016-03-11 19:06:06 +00:00 by dbarriga · 7 comments
dbarriga commented 2016-03-11 19:06:06 +00:00 (Migrated from github.com)

is there any kind of method that launches an event after a file is set into the uploader queue?

is there any kind of method that launches an event after a file is set into the uploader queue?
valorkin commented 2016-05-12 13:20:53 +00:00 (Migrated from github.com)

it will be there

it will be there
bergben commented 2016-05-23 21:54:46 +00:00 (Migrated from github.com)

Isn't that already there?
onAfterAddingFile is called here
So you could just use uploader.onAfterAddingFile if I am not mistaken?

I would like to add an onBeforeAddingFile though, to resize the image in case it is too big using the source code from @ribizli.

Isn't that already [there?](https://github.com/valor-software/ng2-file-upload/blob/development/components/file-upload/file-uploader.class.ts#L196) onAfterAddingFile is called [here](https://github.com/valor-software/ng2-file-upload/blob/development/components/file-upload/file-uploader.class.ts#L89) So you could just use uploader.onAfterAddingFile if I am not mistaken? I would like to add an onBeforeAddingFile though, to resize the image in case it is too big using [the source code from ](https://github.com/ribizli/ng2-imageupload/blob/master/src/utils.ts) @ribizli.
ribizli commented 2016-05-24 03:15:09 +00:00 (Migrated from github.com)

@bergben feel free to reuse my source.

@bergben feel free to reuse my source.
p-renchan commented 2016-06-01 10:08:51 +00:00 (Migrated from github.com)

Could you please give an example on how to subscribe to this event?
It was so easy that now I'm feeling ashamed of myself...

If anyone also confused about this -
uploader.onAfterAddingFile = (fileItem) => { //Your code }

~~Could you please give an example on how to subscribe to this event?~~ It was so easy that now I'm feeling ashamed of myself... If anyone also confused about this - ` uploader.onAfterAddingFile = (fileItem) => { //Your code } `
timvl commented 2016-09-26 14:54:58 +00:00 (Migrated from github.com)

Hi, Is there an example how to use onAfterAddingFile in a controller?

Hi, Is there an example how to use **onAfterAddingFile** in a controller?
perrosen commented 2017-03-03 00:40:13 +00:00 (Migrated from github.com)

@bergben Was there every any update on adding onBeforeAddingFile?

@bergben Was there every any update on adding onBeforeAddingFile?
bergben commented 2017-03-03 09:21:01 +00:00 (Migrated from github.com)

@perrosen I don't know, I have lost track of it as I have implemented my own file-input library without the whole upload functionality as this library would have been overkill for my purposes...

@perrosen I don't know, I have lost track of it as I have implemented my own file-input library without the whole upload functionality as this library would have been overkill for my purposes...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#103