Angular Image Upload with MIME Type Validation 2

Sdílet
Vložit
  • čas přidán 20. 06. 2021
  • In this video we implement file/image upload in our Ionic/Angular LinkedIn clone application. We check the MIME and extension type and verify with the file-type package that the file type matches the specified extension by inspection of its magic number. We also use RxJS to ensure the changes are propagated and that the state is managed appropriately.
    --------------------------------------------------
    Recommended Udemy courses
    --------------------------------------------------
    NestJS - Zero to Hero: tinyurl.com/3rxsz669
    Angular - The Complete Guide: tinyurl.com/4h5rmpsj
    Understanding TypeScript: tinyurl.com/9wz6fp7k
    React - The Complete Guide: tinyurl.com/2t6v5yeu
    Docker Mastery (with Kubernetes + Swarm): tinyurl.com/yeymdnhn
    Playlist: • LinkedIn Clone - Ionic...
    GitHub: github.com/Jon-Peppinck/linke...

Komentáře • 9

  • @Marco-ef5yk
    @Marco-ef5yk Před 2 lety +2

    Hi Jon! I have 1 question:
    - Do you have any idea why the images when refreshed in other pages other than Home and their popover they don't find the image from the database and I get the default images instead? Is there any logic to add that I am missing?

    • @JonPeppinck
      @JonPeppinck  Před 2 lety +1

      Hi Marco, I have addressed these UI glitches in my latest video - Chat UI. I think I've been using the pipe(take(1)) too liberally. Before starting Ionic, I used the ngOnDestroy to unsubscribe, but as you pointed out in another video, Ionic has different lifecycle methods and best practices.

  • @TheVegasISrael
    @TheVegasISrael Před rokem +1

    Thanks again!
    I found that adding property to Post on the fly doesn't make since for me, I think it's blending between two interfaces. So I used to assignee fullImagePath to the post.author.imagePath. Hope I won't have issues with it. Do you plane to make video about preparing project for publishing (build for production)?

    • @JonPeppinck
      @JonPeppinck  Před rokem +1

      Good call. It's better practice to do that. I have recently created a video on typeORM migrations. It is important to not auto sync entities in production and it shows the difference between coding in development vs production. At the end of the Messenger clone series I'm currently working on, I plan on covering a bunch of DevOps related topics including builds and deployments.

  • @rosalyna_24
    @rosalyna_24 Před 3 lety

    can u make a video about signing a pdf after uploading it using angular and node js

    • @JonPeppinck
      @JonPeppinck  Před 3 lety

      Hi Rosalyna, Thanks for checking out the video. Unfortunately I'm not sure how to do that and imagine it would take a considerable amount of time to figure out. I have used software such as image magick / graphics magick to resize and manipulate images, which you can download and make use of on your node server. I would start by looking for some third party libraries and potentially free software that does what you want. Best of luck with that, would be interested to see what you come up with.

  • @moussasangare5640
    @moussasangare5640 Před 3 lety +1

    hello sir , thanks you for this series. It's the end of this series?

    • @JonPeppinck
      @JonPeppinck  Před 3 lety

      Thanks so much for watching the series so far. Lately I have been thinking about adding the ability to chat to added connections/users/friends using web sockets.

    • @moussasangare5640
      @moussasangare5640 Před 3 lety

      @@JonPeppinck ok