Download & Upload File - RESTful API with Laravel - 13

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024
  • Giving download option to the user is a pretty common requirement in today’s web apps for the variety of reasons. For example, if your application is related to online shopping, you might need an invoice download feature, in this scenario, you might need to force the user’s browser to download the file at the given path.
    Here we will learn easy way to force the browser to download user requested file using API Laravel.
    Remember!
    Anybody can learn programming no matter who you are. You just need some time to study.
    The most starred PHP framework, Laravel. My goal with this Laravel tutorial to create a guide for those learning the framework. This guide will take you from the very beginning of an idea into a real deployable application.
    Laravel Tutorial Series Playlist:
    • Setup Laravel 6 in Hin...
    Laravel API Tutorial Playlist:
    • Setup - RESTful API wi...
    Laravel Tutorials Playlist:
    • PHP with Laravel for b...
    #LaravelTutorial #LaravelHindi #LaravelTutorialSeries #AtifNaseem #Laravel

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

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

    thanks for your helpfull its so easy after watch your video

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

    Zo'r, charchamang

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

    Good video. thank you very much

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

    a person with the best concepts

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

    It's one of the best tutorial of RESTFUL API with Laravel.
    Thanks a lot for your effort :)

  • @SHAJ.T3CH
    @SHAJ.T3CH 5 лет назад +4

    brother, can you please make just one video that shows how to use this rest API with an admin panel like admin LTE, it will complete the concept, I am very much confused about this. you said you would make a basic crud with admin panel and rest api, if you are busy can you just show how to add an admin panel to this rest api so that we canwork with this api with admin panel?

    • @AtifNaseem
      @AtifNaseem  5 лет назад +1

      Thank you SHAJ .T3CH, I am planning to make video on implementation of admin LTE along with API implementation. I will upload after EID.

    • @SHAJ.T3CH
      @SHAJ.T3CH 5 лет назад

      @@AtifNaseem that will be the best tutorial ever, please make the series

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

    Thanlk a lot for tour effort and your vidio

  • @thecodesolution3416
    @thecodesolution3416 5 лет назад +1

    just what i was looking for, thanks atif

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

    Thanks, Atif! This was video was VERY helpful.

  • @---hq5tr
    @---hq5tr 4 года назад

    Very big, good jobs

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

    That's great!

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

    Excelente explicación

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

    thank you man!

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

    why in postman i have=Couldn't upload file
    Make sure that Postman can read files inside the working directory. My settings in postman directory have
    ~/Postman/files
    ???

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

      step by step solution is here learning.postman.com/docs/getting-started/settings/

  • @いとうなつほ
    @いとうなつほ 4 года назад

    Your video was really helpful for me, thanks!

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

    your video is great! now how do I point this photo upload into my table in the mysql database?

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

      I never save photo to mysql db, but you can using blob data type.

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

    thank you sir

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

    Hi, mate first of all thank you for all the content it was very helpful. I do have a question how do I upload a flag photo for the country using postman? i am beginner to Laravel so could you please help.Thank you in advance

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

      You can easily upload image in a director with 2 or 3 characters name.

  • @SHAJ.T3CH
    @SHAJ.T3CH 5 лет назад +1

    awesome

  • @BudiSantoso-er6cq
    @BudiSantoso-er6cq 3 года назад

    This was video was very helpful..
    (I am referring to @ abal2 studio's question )
    After downloading the image, I want to display the image using Vuetify (frontend), how do I do it?
    can you please provide of the source code, please help me, thank you very much

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

      If you want to display the image, after uploading return the path and load it.

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

    Hello how can I upload image or video please🙏🙏

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

      I will upload a video on this. You can use dropjs for image or video.

  • @abal2studio
    @abal2studio 5 лет назад

    Assalamualaikum, can i use return image from response->download for display image url link? or just for download only?

    • @AtifNaseem
      @AtifNaseem  5 лет назад

      You can display the image using this method

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

    Hi, is it work in Laravel 8 ?

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

      I get just headers content-type: image/png response in Laravel 8, I'll get content-type with file excel

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

      solved, i don't know whats wrong with my chrome browser, but it's work in other browser.

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

      great Muhammad Hizbullah

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

      It should work

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

      these are basics and will work in all upcoming versions.

  • @anandverma1472
    @anandverma1472 5 лет назад

    Awesome dude.

  • @TheMezanine
    @TheMezanine 5 лет назад

    Thanks very much, very usefull for me

    • @AtifNaseem
      @AtifNaseem  5 лет назад

      My pleasure. Don't forget to like : )

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

    U r laravel master

  • @xeonm8415
    @xeonm8415 5 лет назад

    Good job!

    • @AtifNaseem
      @AtifNaseem  5 лет назад

      Thank you. Don't forget to like : )

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

    can you please create multiple file upload using laravel rest api?

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

      you can send files one by one. but sure I will.

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

    how to delete the same image can you provide the code???
    it's urgent

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

      You can delete using File::delete($filename); or
      $files = array($file1, $file2);
      File::delete($files);

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

    How to upload file in postman using 'raw' instead of 'form-data'

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

      Files can only be uploaded using the 'binary' and 'form-data' option. Postman considers raw data as a string.
      Have a look at the documentation for a complete list of options Postman provides: www.getpostman.com/docs/postman/sending_api_requests/requests

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

    uploading image API isn't working. giving 419 "unknown status" error

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

      It's possible your session domain does not match your app URL and/or the host being used to access the application.
      1.) Check your .env file:
      SESSION_DOMAIN=example.com
      APP_URL=example.com
      2.) Check config/session.php
      Verify values to make sure they are correct.

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

    how will we insert the path in db?

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

      you can save value like /save_files/file etc.

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

    Thanks

  • @riansefriadisefriadi3407
    @riansefriadisefriadi3407 5 лет назад

    I like this video, make a CRUD client tutorial using from HTML directly without virtual postman ... thanks..

    • @AtifNaseem
      @AtifNaseem  5 лет назад

      I will make a complete ERP Laravel app tutorial and cover this. Watch this CRUD user wise tutorial ruclips.net/video/WPmkf4EzF3U/видео.html

  • @Shiko0o0oHamaki
    @Shiko0o0oHamaki 5 лет назад

    awsome

    • @AtifNaseem
      @AtifNaseem  5 лет назад

      Thank you. Don't forget to like : )