GithubHelp home page GithubHelp logo

Comments (7)

p-renchan avatar p-renchan commented on August 16, 2024 5

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 }

from ng2-file-upload.

bergben avatar bergben commented on August 16, 2024 3

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.

from ng2-file-upload.

perrosen avatar perrosen commented on August 16, 2024 1

@bergben Was there every any update on adding onBeforeAddingFile?

from ng2-file-upload.

valorkin avatar valorkin commented on August 16, 2024

it will be there

from ng2-file-upload.

ribizli avatar ribizli commented on August 16, 2024

@bergben feel free to reuse my source.

from ng2-file-upload.

timvl avatar timvl commented on August 16, 2024

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

from ng2-file-upload.

bergben avatar bergben commented on August 16, 2024

@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...

from ng2-file-upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.