Laravel How To Upload,View And Download Pdf,Docx,Mp4,Mp3 In Laravel Laravel Tutorial From Scratch

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

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

  • @WebTechKnowledge
    @WebTechKnowledge  3 года назад +17

    Source Code here
    Controller
    PageController.php
    ==================================================================

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

      Sir can i get full source code please, sufimiftakhoneki@gmail.com

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

      I am not getting file in with same code it is giving NOT FOUND error

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

      I am doing it in resource controller show function

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

      migration code and product code pls

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

      after executing all steps this error is showing 'Class "App\Http\Controllers\products" not found'' on this line $data=new products(); what should i do?
      can you help

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

    You saved a brothers life bro, all other tuts were complicating a rather easy piece of code

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

    Simple and understandable explanation. Thanks a lot!

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

    Very good ! Extremely helpful, thanks !

  • @SykotiE-awarenessCenter
    @SykotiE-awarenessCenter 7 месяцев назад

    You just saved me a lot of time !

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

    I have watched dozens of tutorials trying to display a pdf file in an element and it wasn't working. All of a sudden I watch this video and it works! And the crazy thing about it is that you did not change anything, it's the same as the others🙆‍♂🙆‍♂🙆‍♂

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

      i always try to make my tutorial as easy as possible

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

      @@WebTechKnowledge well thank you very much

  • @ImranShaikh-lu6wq
    @ImranShaikh-lu6wq 2 года назад

    Thank you for video , i had seen this video and i solved one problem

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

    This is a very recommended video for view and download file good job sir! 👍

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

    Thanks! this video help so much

  • @fakeyejoshua781
    @fakeyejoshua781 5 месяцев назад

    simple, thanks alot

  • @Nisaa107_
    @Nisaa107_ 7 месяцев назад

    Thanks again sir, aaaa masyaaAllah ❤ the tutorial simple and there is no problem 👍🏻✨

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

    Thankyouu so muchh

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

    Thank you so much, you saved my day

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

    Thank you so much sir

  • @RoronoaZoro-sr1xl
    @RoronoaZoro-sr1xl 3 года назад +1

    You are a lifesaver bro

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

    Thank you so much

  • @QueenSs-n7s
    @QueenSs-n7s Год назад

    it really helped us

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

    Thanks a lot that helped me

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

    Thank you!

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

    Thanks sir for this simple code. Now I Have exactly like in this video but my file isn't downloading / viewing. I realized that you typed the name storage wrongly when calling the illuminate.... and yours worked. Could you please give a solution to make the file downloadable

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

    nice

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

    Thanks ❤

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

    Thank you so much, it worked fine with me at laravel" ^8.12" 😍

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

    i am facing 404 not found.My File is successfully uploaded in db and in location also but not showing in ,,,i use move(public_path('images') instead of storage. Pls help i am stuck

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

    good Job bro

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

    amazing

  • @Muhammadijaz-pt4td
    @Muhammadijaz-pt4td 10 месяцев назад

    It's awesome and appreciated, would be great if you share source code link :)

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

    thanks

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

    any advice to able open pdf and image file ? with javascript or other ?

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

      With the same code you will be able to open pdf and image file

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

      @@WebTechKnowledge i did it the same but somehow when opening pdf file it got redirect to my home view wonder why ... opening image is good thou

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

      i fix it, the cant read special character on file name so its error

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

    Hello sir.Thanks for the video and source codes.But can i ask about the database Type of the column "file" you are using? Text or Varchar?thanks

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

    YOU ARE GOD

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

    Thank you so much sir, but I have a question why only pdf, photos and videos can be seen in view. like docx, excel can't be seen in view, it downloads automatically.

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

    Great 👍🏻’ but what if we want to keep it optional ? I have try to keep it empty and give me error call bad method getClientExtention on null ()
    Can you please advise ?
    Thanks

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

      if($image)
      {
      ..image code to save image
      }

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

      Thanks, what about edit, and update. Do you have a tutorial for that ?

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

    Nice, but show how to do file validation, extentions and size, for video not more then 400mb and etc.

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

    Hip picure a situation where i only want to preview part of the file (eg only page one). How do i approach that

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

    I thought you use Illuminate\Support\Facades\Stroage instead of Illuminate\Support\Facades\Storage;.. But why still not facing an error?

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

    Sir can we upload and view the pdf video documents file threw ajax. If its possible then please one video where help of ajax video pdf file will upload. Its request sir

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

    hey bro great work but i have a small problem in view and download always page not found

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

      First check if the file is successfully uploaded to the database.
      Then Check the file location where you are uploading your file.
      After that check the file location in the code from where you are viewing and downloading.

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

      @@WebTechKnowledge thank u for ur response .
      -the upload works fine and files are uploaded in assets folder, but still download and view show page not found and the package(use Illuminate\Support\Facades\Storage;
      ) is not being used also
      public function download(Request $request, $file)
      {
      //dowload file from assetes.file 'assets is the file location'
      return response()->download(public_path('assets/' . $file));
      }
      //Request $request is not being used its faded in vs code

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

      @@zigaba give me your gmail address. i will send you the source code .

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

      @@WebTechKnowledge postetunisienne99@gmail.com
      and thank you very much

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

      Check your email. I send the source code

  • @learn_with_mrd
    @learn_with_mrd 3 года назад +2

    I get this error "Call to undefined method Symfony\Component\HttpFoundation\BinaryFileResponse::header()"

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

      hi hope u found the solution and still remember it, can u help me hhhhh

  • @e-learningedu2309
    @e-learningedu2309 2 года назад

    The upload works fine and files are uploaded in assets folder and the View worked fine, but still download Show The GET method is not supported for this route. Supported methods: POST. what can i do

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

    Route::get('/view/{is}',[PageController::class,'view']); if i have to file in which i use view how i can differentiate it

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

    Undefined variable $data
    what should i do to fix this?thanks

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

    Please can you help me out (Method App\Http\Controllers\PageController::uploadproduct does not exist.)

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

    My view function is working, but the pdf file is not opening. It's remaining blank

    • @zlhm.a
      @zlhm.a 2 года назад

      Same as mine, have you got the solution?

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

    public\assets folder not found when download and view

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

    Class "App\Models\Product" not found in your source code

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

    Sir view and download are not found . I have created both function and viewfile also

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

    Thank you very much sir but my PDF and other files are not uploading
    Only image file is uploading how can I solve it sir.

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

      Hey , i have comment the source code in the first comment . Check it out . It might help you

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

    please tell how to get/ extract the contents of uploaded file in laravel?

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

      Do you want to show the data of the uploaded file?

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

      @@WebTechKnowledge yes exactly. e.g I have a student file .txt, .docx or any other file. I want to extract the details e.g name, address, contact etc., information from that student file.

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

      My email : yaminshakil7@gmail.com
      You can send the issue in your code in my mail if you want..
      I will check it and will try to find a solution

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

    thanks for the video......but it doesnt work for docx....docx file isnt displayed...instead it automatically gets downloaded

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

      me too

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

      @@WebTechKnowledge Me too. How can i fix it?

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

      @@blank_7593 you cannot display doc file in browser . browser do not support doc file

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

      @@WebTechKnowledge how about when I have more than 1 file how can i download the specific 1?

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

    sir can you remake this video

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

    downloaded but not the pdf file

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

    can i have source code?

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

    but this video is not for upload video

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

    Hai can you send me the whole code for this ? It’s urgent

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

      Give your mail

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

      @@WebTechKnowledge sitinurnabilaabdulrashid@gmail.com

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

      Check your mail. I have send the source code

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

      @@WebTechKnowledge yes, thanks a lot sir but when I try to view the document that I’ve been uploaded,it doesn’t show but still can download it. I try it on your code and get the same result too

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

      Check the file location where you are saving the file .then check in the blade that are you actually calling the file properly ..It's not showing probably because file location is not correct.

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

    Thank you so much sir.

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

    Thank you!