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

  Рет қаралды 51,293

Web Tech Knowledge

Web Tech Knowledge

3 жыл бұрын

In this tutorial you will learn about how you can upload any file in laravel and then how you can view them and download them as well.
I hope I was able to help you learn it.
Please make sure to subscribe to my channel. I will really appreciate it if you do and also give this video a like.
Support This Channel :
Join this channel to get access to perks:
/ @webtechknowledge
Your support will be really appreciated.
Thanks For Watching.
I hope This video was helpful.
If you have any questions then let me know in the comment section.
Best of luck.
#webtechknowledge
You can connect with me with the given links below:
Please Subscribe to this channel: / @webtechknowledge
Join this channel to get access to perks:
/ @webtechknowledge
Follow me on :
Facebook Link: / yaminshakil07
Instagram Link: / yamin_shakil
Twitter Link: / yaheashakil

Пікірлер: 123
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Source Code here Controller PageController.php ==================================================================
@sufim5693
@sufim5693 3 жыл бұрын
Sir can i get full source code please, sufimiftakhoneki@gmail.com
@ArslanMajid
@ArslanMajid Жыл бұрын
I am not getting file in with same code it is giving NOT FOUND error
@ArslanMajid
@ArslanMajid Жыл бұрын
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 Жыл бұрын
You saved a brothers life bro, all other tuts were complicating a rather easy piece of code
@oleksandraromanova4397
@oleksandraromanova4397 Жыл бұрын
Simple and understandable explanation. Thanks a lot!
@name_code5092
@name_code5092 Жыл бұрын
This is a very recommended video for view and download file good job sir! 👍
@ImranShaikh-lu6wq
@ImranShaikh-lu6wq Жыл бұрын
Thank you for video , i had seen this video and i solved one problem
@fernandafratamamud6926
@fernandafratamamud6926 4 ай бұрын
Very good ! Extremely helpful, thanks !
@sawsanaljuhani5769
@sawsanaljuhani5769 2 жыл бұрын
Thank you so much, it worked fine with me at laravel" ^8.12" 😍
@new_direction_net
@new_direction_net Жыл бұрын
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 Жыл бұрын
i always try to make my tutorial as easy as possible
@new_direction_net
@new_direction_net Жыл бұрын
@@WebTechKnowledge well thank you very much
@SykotiE-awarenessCenter
@SykotiE-awarenessCenter 2 ай бұрын
You just saved me a lot of time !
@fakeyejoshua781
@fakeyejoshua781 Ай бұрын
simple, thanks alot
@mamadumamadu6673
@mamadumamadu6673 Жыл бұрын
Thank you so much, you saved my day
@lianoisaac169
@lianoisaac169 2 жыл бұрын
Thank you!
@dimskuy132
@dimskuy132 5 күн бұрын
Thankyouu so muchh
@ad4ms87
@ad4ms87 6 ай бұрын
Thanks! this video help so much
@Nisaa107_
@Nisaa107_ 3 ай бұрын
Thanks again sir, aaaa masyaaAllah ❤ the tutorial simple and there is no problem 👍🏻✨
@gorreon
@gorreon 3 ай бұрын
Thank you so much
@user-or2mq9me4s
@user-or2mq9me4s Жыл бұрын
it really helped us
@shailzarani3849
@shailzarani3849 2 жыл бұрын
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
@davidkamau7871
@davidkamau7871 2 жыл бұрын
Hip picure a situation where i only want to preview part of the file (eg only page one). How do i approach that
@bimakumkum277
@bimakumkum277 10 ай бұрын
Thank you so much sir.
@mrafatul1227
@mrafatul1227 2 жыл бұрын
Thanks ❤
@RoronoaZoro-sr1xl
@RoronoaZoro-sr1xl 3 жыл бұрын
You are a lifesaver bro
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Thank you 🥰🥰
@nandopookey9195
@nandopookey9195 Жыл бұрын
Thank you so much sir
@xaygi8329
@xaygi8329 2 жыл бұрын
good Job bro
@englishprimiereleague1677
@englishprimiereleague1677 11 ай бұрын
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
@easypeasy5523
@easypeasy5523 Жыл бұрын
amazing
@experiment4443
@experiment4443 3 жыл бұрын
Thanks a lot that helped me
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Glad to hear that
@martinjones8231
@martinjones8231 3 жыл бұрын
Did your PDF file upload
@hamtaro7824
@hamtaro7824 2 жыл бұрын
thanks
@e-learningedu2309
@e-learningedu2309 Жыл бұрын
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
@konstantinnefedov5731
@konstantinnefedov5731 2 жыл бұрын
Nice, but show how to do file validation, extentions and size, for video not more then 400mb and etc.
@Muhammadijaz-pt4td
@Muhammadijaz-pt4td 6 ай бұрын
It's awesome and appreciated, would be great if you share source code link :)
@codetuturial6379
@codetuturial6379 Жыл бұрын
nice
@lucifer2099
@lucifer2099 3 жыл бұрын
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
@fajardwirani8080
@fajardwirani8080 11 ай бұрын
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.
@johngideon9305
@johngideon9305 Жыл бұрын
Please can you help me out (Method App\Http\Controllers\PageController::uploadproduct does not exist.)
@user-db9et5yn7l
@user-db9et5yn7l Жыл бұрын
Route::get('/view/{is}',[PageController::class,'view']); if i have to file in which i use view how i can differentiate it
@vireakron17
@vireakron17 Жыл бұрын
public\assets folder not found when download and view
@ALEXANDERUJANG
@ALEXANDERUJANG 2 жыл бұрын
I thought you use Illuminate\Support\Facades\Stroage instead of Illuminate\Support\Facades\Storage;.. But why still not facing an error?
@abuubaid4734
@abuubaid4734 2 жыл бұрын
Sir view and download are not found . I have created both function and viewfile also
@simonromero4874
@simonromero4874 Жыл бұрын
YOU ARE GOD
@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 ?
@melodicTune9464
@melodicTune9464 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
@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
@WebTechKnowledge
@WebTechKnowledge Жыл бұрын
Varchar
@daryleresano2429
@daryleresano2429 Жыл бұрын
@@WebTechKnowledge thank you so much
@jamelraposas1489
@jamelraposas1489 8 ай бұрын
Undefined variable $data what should i do to fix this?thanks
@strawberrymilktea111
@strawberrymilktea111 8 ай бұрын
Same problem, did u fix it?
@AYIP53
@AYIP53 Жыл бұрын
Class "App\Models\Product" not found in your source code
@ReelEdFun238
@ReelEdFun238 2 жыл бұрын
My view function is working, but the pdf file is not opening. It's remaining blank
@zlhm.a
@zlhm.a Жыл бұрын
Same as mine, have you got the solution?
@tothebone4613
@tothebone4613 Жыл бұрын
any advice to able open pdf and image file ? with javascript or other ?
@WebTechKnowledge
@WebTechKnowledge Жыл бұрын
With the same code you will be able to open pdf and image file
@tothebone4613
@tothebone4613 Жыл бұрын
@@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 Жыл бұрын
i fix it, the cant read special character on file name so its error
@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
@johnmichaelvincentgenato6790
@johnmichaelvincentgenato6790 2 жыл бұрын
downloaded but not the pdf file
@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
@herbertmangubat3531
@herbertmangubat3531 Жыл бұрын
can i have source code?
@mathahmad
@mathahmad 4 ай бұрын
sir can you remake this video
@WebTechKnowledge
@WebTechKnowledge 4 ай бұрын
Sure I will soon
@mohamedalibahri1984
@mohamedalibahri1984 3 жыл бұрын
hey bro great work but i have a small problem in view and download always page not found
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
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.
@mohamedalibahri1984
@mohamedalibahri1984 3 жыл бұрын
@@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 жыл бұрын
@@mohamedalibahri1984 give me your gmail address. i will send you the source code .
@mohamedalibahri1984
@mohamedalibahri1984 3 жыл бұрын
@@WebTechKnowledge postetunisienne99@gmail.com and thank you very much
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Check your email. I send the source code
@kadershaikh1704
@kadershaikh1704 3 жыл бұрын
thanks for the video......but it doesnt work for docx....docx file isnt displayed...instead it automatically gets downloaded
@muhammadalfarizi1842
@muhammadalfarizi1842 2 жыл бұрын
me too
@blank_7593
@blank_7593 Жыл бұрын
@@WebTechKnowledge Me too. How can i fix it?
@WebTechKnowledge
@WebTechKnowledge Жыл бұрын
@@blank_7593 you cannot display doc file in browser . browser do not support doc file
@blank_7593
@blank_7593 Жыл бұрын
@@WebTechKnowledge how about when I have more than 1 file how can i download the specific 1?
@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.
@natasaantic8237
@natasaantic8237 Жыл бұрын
Thank you!
File Upload in Laravel: Main Things You Need To Know
13:58
Laravel Daily
Рет қаралды 22 М.
Laravel CRUD in 50 minutes for Beginners  from Scratch
49:58
Devtamin
Рет қаралды 195 М.
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 4,6 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 35 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 38 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,3 МЛН
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 932 М.
Laravel Tutorial : Upload Multiple Files/Images
25:51
devhubNP
Рет қаралды 18 М.
Laravel Security: Top 7 Mistakes Developers Make
11:16
Laravel Daily
Рет қаралды 82 М.
Generate PDF files in Laravel 11 using DomPDF Package
15:50
Error Solution
Рет қаралды 2,6 М.
Laravel Upload Image and Create Storage Link
17:28
Code Online
Рет қаралды 74 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 559 М.
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 4,6 МЛН