Upload image and show preview in angular || Angular || Angular Tutorial || Image Upload In Angular

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

Комментарии •

  • @djohnson-ku4cl
    @djohnson-ku4cl Год назад +4

    Thank you great video! I had to make updates to make it work for TypeScript and all the types.. For the template code use:
    For the typescript code use:
    url: string|null|ArrayBuffer = './assets/banner1.jpg'
    onFileSelected(files: FileList | null) {
    if (files) {
    var reader = new FileReader()
    reader.readAsDataURL(files[0])
    reader.onload = (event:Event) => {
    let fileReader = event.target as FileReader
    this.url = fileReader.result;
    }
    }
    }

  • @daniloporto515
    @daniloporto515 3 года назад +4

    Thanks for the video! HELPED ME A LOT IN MY STUDIES :) . For those using Angular 12 or 13 adjust onselectFile(event) use "any" onselectFile(event:any).

  • @weixiangng8279
    @weixiangng8279 8 месяцев назад

    Thanks for the video. Help me a lot for the upload part.

  • @utkarshgupta3209
    @utkarshgupta3209 4 года назад +2

    thank you so much sir, this video helped in saving my job

  • @NaveenMangoli
    @NaveenMangoli 2 месяца назад

    Sir have to store this file to db in sql so what datatype have to choose in db

  • @surajdhimaan9311
    @surajdhimaan9311 3 года назад

    thank you sir really you saved me dil se salaam

  • @vikasswamy3498
    @vikasswamy3498 2 года назад

    sir want to know how to display an image after complete load of angular module /component .. after complete loading only it should display until then visibility is hidden

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      Initially visibility hidden and inside ngafterviewinit you have to write visibility visible

  • @AristeoPerez
    @AristeoPerez 4 года назад +1

    is it compatible with ionic/angular?

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      I haven’t worked on iconic. Try this code and check it.

  • @sebastianacosta4677
    @sebastianacosta4677 2 года назад

    You Are The Best.....

  • @noelara4356
    @noelara4356 4 года назад

    Thank You SO Much, it has been easier than other ways I saw. I need this hehehe Thanks!

  • @santoshborgad9886
    @santoshborgad9886 3 года назад

    Thank you so much sir , this video is very informative for me...

  • @utkarshgupta3209
    @utkarshgupta3209 4 года назад

    sir, if user selects a video then it should preview video and if user selects photo then it should preview photo, how to do it please help.

    • @CreativeDeveloper
      @CreativeDeveloper  4 года назад

      You have to be show default image for video or any doc file.

  • @MhmmDonuts
    @MhmmDonuts 4 года назад

    Does it also show a preview when I try to upload a pdf file? I need to read the file and convert it into blob /base64 string to save it in db

    • @CreativeDeveloper
      @CreativeDeveloper  4 года назад +1

      You can show default image or icon for pdf.

    • @MhmmDonuts
      @MhmmDonuts 4 года назад

      @@CreativeDeveloper perfect, nice video btw 👌

    • @senthamarai_kannan.
      @senthamarai_kannan. 2 года назад

      @@MhmmDonuts do you have any link to convert image to blob by post and get it from backend i am using angular and django

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      @@MhmmDonuts Thanks for watching

  • @archanabhowmick9787
    @archanabhowmick9787 3 года назад

    Great sir. It is helpful

  • @Daniblueboy
    @Daniblueboy 2 года назад

    awesome, this really helped me

  • @anirudhabhowmik
    @anirudhabhowmik Год назад

    Excellent

  • @suvendubiswal6820
    @suvendubiswal6820 Год назад

    How can be saved in angular using ajax and laravel

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      You have to understand the difference between client side and server side. Angular is fronted means client side. You can write download attribute to download image but if you want to download in specific folder then server side programming require.

  • @nicenamenicesurname8365
    @nicenamenicesurname8365 2 года назад

    This is so good man thank you

  • @SusantaMuduli
    @SusantaMuduli Год назад

    can you please tell how to upload image in local angular folder

  • @thisworld6548
    @thisworld6548 4 года назад

    thank you so much for making this video

  • @geraldineacevedo1328
    @geraldineacevedo1328 9 месяцев назад

    Thanks!

  • @georgeak4454
    @georgeak4454 2 года назад

    niceee video Can u make one about multi step form with angular please ? it will be amazing

  • @jlonso1840
    @jlonso1840 4 месяца назад

    works good,

  • @abthewebworld
    @abthewebworld 3 года назад

    Please tell me how to send this uploaded image to other components. Please tell me. I am stucked at one point.

    • @SanjayKumar-vd9gb
      @SanjayKumar-vd9gb 3 года назад

      I am also facing the same issue… my issue is:- I have attached a file in the parent component and I have to show the preview of that file in a dialog pop up while clicking on view button…….till now I have made the dialog box that works on clicking the view button but I am facing problem to call that attached file in the dialog box………please help me

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      You have to pass the variable where I stored image data to other component

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      @@SanjayKumar-vd9gb I have written html where image will display. You have to write that html file inside your popup

  • @tamilselvan152
    @tamilselvan152 4 года назад

    How to get input field value like dis

  • @MZ-uv3sr
    @MZ-uv3sr 3 года назад

    hmmm, it's hitting reader.onload but not updating the front end with the picture.

  • @talalzeid7500
    @talalzeid7500 3 года назад

    I dont understand , where is the upload ? in which folder can i find it ?

    • @CreativeDeveloper
      @CreativeDeveloper  3 года назад

      This is frontend part only.you can't find upload folder. This is for showing purpose to the user that which image is going to upload.

  • @toan6375
    @toan6375 Год назад

    Thank you so much!!!

  • @CodeWithJamil786
    @CodeWithJamil786 4 года назад

    sir how to update image in angular please make video on it

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      You have to write server side code means backend like node etc.

  • @stensej6841
    @stensej6841 3 года назад

    Thx very much ! Like !

  • @NguyenHung-ye3cb
    @NguyenHung-ye3cb 3 года назад

    it's so helpful

  • @raghavendrakesari337
    @raghavendrakesari337 2 года назад

    Thanks bro

  • @pedromoreira1311
    @pedromoreira1311 3 года назад

    Thank you sir.

  • @nothinganything7593
    @nothinganything7593 4 года назад

    Make like this video more

  • @ohmyfoodies2753
    @ohmyfoodies2753 3 года назад +1

    Not getting preview

  • @Pragya_Empower_Studies
    @Pragya_Empower_Studies 3 года назад

    thanks a lot sir

  • @breakerk.7253
    @breakerk.7253 2 года назад

    thank you sir

  • @cricketloverz9026
    @cricketloverz9026 3 года назад

    Sir we are waiting for new video please upload sir ❤️❤️❤️

    • @CreativeDeveloper
      @CreativeDeveloper  Год назад

      I upload video regularly. Please watch and thanks for watching this video

  • @abbeygamekhel5884
    @abbeygamekhel5884 2 года назад

    Helped

  • @aavsz
    @aavsz 2 года назад

    thanks you!!!

  • @mrtrader3661
    @mrtrader3661 Год назад

    where the image is uploaded?

  • @ravindrachorge
    @ravindrachorge 3 года назад

    Thanks

  • @jdmasoft
    @jdmasoft 4 года назад

    thank u

  • @kaloyanh.996
    @kaloyanh.996 Год назад

    The content is old and it doesn't work !

  • @ahmedbahpullo8544
    @ahmedbahpullo8544 2 года назад +1

    thanks

  • @Sully.....
    @Sully..... 10 месяцев назад

    thank u

  • @usmanAli-hw5xu
    @usmanAli-hw5xu Год назад

    Thank you Sir