Image Upload in React with Asp.Net Core Web API

Поделиться
HTML-код
  • Опубликовано: 22 сен 2024
  • 🍒 Related Videos
    Part 2 of this Video: • React JS & Asp.Net Cor...
    React Quiz App with Web API: • Build a React.js Quiz ...
    React CRUD with .Net Core API: • Complete React CRUD wi...
    React Master Detail CRUD with .Net Core API: • Asp.Net Core Web API M...
    Everyone's favourite way of creating React forms: • React Hook Form - 1. I...
    🚀 Udemy Course on React Hook Form (Popular React Form Library)
    ➤ bit.ly/3ADbnZy (Discount auto-applied)
    💖 Channel Support
    ➤ Paypal: bit.ly/3L36ut4
    ➤ UPI App: geni.us/ScanQR...
    ➤ Amazon: geni.us/Amazon...
    💌 For Business Inquiries
    ➤ codaffection@gmail.com
    🚶‍♂️ Follow us
    Facebook : / codaffection
    Discord : / discord
    Twitter : / codaffection
    ---
    Upload an image in React with Asp.Net Core Web API
    In this tutorial, we discuss how to upload images in Reactjs with Asp.Net Core WebAPI.
    First of all, we build an Asp.Net Core web API and created an SQL server DB with an entity framework core. and then created an asp.net core API controller for image upload.
    We have created the client-side app in Reactjs. Inside that, a form with an image uploader is designed. The selected image preview is shown separately. Inside the form submit event, we've uploaded the selected image to Asp.Net Web API.
    Tools Used: VS Code, Visual Studio, SSMS, Postman
    Discussion @ Time
    ___________________
    0:02:40 - Define .Net Core DBModel
    0:10:50 - Create React js App
    0:17:24 - React form with image uploader
    0:26:17 - Show selected image preview
    0:33:06 - Form Validation with File Uploader
    0:38:56 - Submit React Form with Image
    0:49:41 - Save Image in Asp.Net Core WebAPI
    #Reactjs #AspNetCore #CodAffection

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

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

    goo.gl/bPcyXW : Buy me a Coffee
    bit.ly/4dWUGYd : Part 2
    bit.ly/3MkvBrh : React Quiz App with Web API
    bit.ly/3Me2bxo : Everyone's favourite way of creating React forms
    bit.ly/2t0op0W : React CRUD with .Net Core API
    bit.ly/2N9QjkE : Master Detail CRUD with React & .Net Core API
    bit.ly/3Me2bxo : Everyone's favourite way of creating React forms

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

      Hey i've followed your demo but whenever i submit the error "Object Reference not set to an instance of an object" at the code in 54:06 in your video. What should I do with that? Thanks

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

    Real Industry level Project ! Very well explained ,Thank you Sir

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

    This is exactly what i've been searching, thank you for this video. Im building an ecommerce project, and got stuck with my product images. Thanks.

  • @easycodingbysethu
    @easycodingbysethu 3 месяца назад

    Excellent and useful demonstration I would like to (definitely donate) after my financial situation slightly improves ! Thank you

  • @ankurworld
    @ankurworld 6 месяцев назад

    great tutorial

  • @chriscalver8595
    @chriscalver8595 6 месяцев назад

    Thank you Thank you Thank you

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

    This was a great way to present React. Can't wait for you to present Blazor Web Assembly version of this tutorial. I want to hear your thoughts.

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

    So usefully video, thanks

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

    Great video! Thank you!

  • @md.naimurrahman8901
    @md.naimurrahman8901 3 года назад

    Thanks a Lot. From Dhaka

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

    Sos grande loco! Gracias! Thanks bro! you rock!

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

    Thank You For This Video

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

    perfect tutorial, thank you very much!

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

    Amazing content!
    Thank you for this video.
    I learned a lot of things.

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

    Awesome tutorial, CodAffection. Keep up the good work.

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

    thanks for the video it helped me so much

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

    59:22 BBBBOOOOOOMMMMM

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

    me salvaste de una muy grande con este video me suscribo!

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

    U r the best!

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

    Hey at 27:37 you make sure that if the user cancels the window then it resets. This isnt working for me. Has something changed in react or something?

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

    Justo lo que buscaba, muchas gracias...!!

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

    i had a problem in craeting instance of complexe type class any solution pls !

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

    for getting the src of file i used src: URL.createObjectURL(e.target.files[0]) and it worked fine 😀 Thanks For The Video

  • @md.nayonhossain6383
    @md.nayonhossain6383 3 года назад

    Thanks sir, very helpful video

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

    You are the best 🤗🤗

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

    awesome

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

    how to prevent to upload pdf file after extension change from pdf to jpg

  • @AkshayPaunikar
    @AkshayPaunikar 4 года назад +5

    Can you do one video on react using typescript just for fun 🙂

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

    is this image save on sql data base api's image file?

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

    Thanks you, video very nice. But you can't show me how to upload multiple file. Please help me!

  • @arjunm.r8641
    @arjunm.r8641 3 года назад

    Is it possible create web api without entity framework?

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

    Getting error while adding the controller error : Pakage restore failed ,Rolling back packages changes...could u pls guid me in this?

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

      did you try this solution here.
      stackoverflow.com/a/46144314/4133590

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

    My API isnt allowing empty string from the attribute "ImageName" , i always get an error .
    I currently put a placeholder name in it but how can i fix it?

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

      Same issue

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

      How to fix the issue...not able to hit the post acction method throwing 400 status.

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

      @@sandeeppondala4863 [Column(TypeName = "nvarchar(100)")]
      [Required(AllowEmptyStrings = true),
      DisplayFormat(ConvertEmptyStringToNull = false)]
      public string? ImageName {get; set; }
      You change this in EmployeeModel.cs
      Reason: You have to allow emptyString and you have to stop the conversion of empty strings into null.

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

      @@murphy_artz9326 thanks for the help

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

    Cool video! What fonts are you using in visual studio tho? They look so cool

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

    How to resize the uploaded image?

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

    Can you please share the source code for this project?

  • @manishraj-it2qv
    @manishraj-it2qv 3 года назад

    The continuous of the video hasn't uploaded yet. Please upload that

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

    which font type did you use Sir?

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

    Image Upload Zoom
    ruclips.net/video/EvuJsC-xaWs/видео.html

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

    it's a real pain to follow along here. I have to pause it every two seconds because you're just cutting away so much. Other than that it's all well explained. thank you

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

    bro pls do same in Django+ react

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

      I'll try. thanks for the suggestion.

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

    who scream on the background

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

    Hi the API is working fine locally but when it is uploaded to server it giving error "Invalid argument", status: 200, statusText: "OK" but file is not getting uploaded

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

      Make sure you have the permits to write into the solution or destinatary folder bro