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
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🙆♂🙆♂🙆♂
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
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
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.
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
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
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.
@@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
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
@@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 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
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.
Source Code here
Controller
PageController.php
==================================================================
Sir can i get full source code please, sufimiftakhoneki@gmail.com
I am not getting file in with same code it is giving NOT FOUND error
I am doing it in resource controller show function
migration code and product code pls
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
You saved a brothers life bro, all other tuts were complicating a rather easy piece of code
Simple and understandable explanation. Thanks a lot!
Very good ! Extremely helpful, thanks !
You just saved me a lot of time !
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🙆♂🙆♂🙆♂
i always try to make my tutorial as easy as possible
@@WebTechKnowledge well thank you very much
Thank you for video , i had seen this video and i solved one problem
This is a very recommended video for view and download file good job sir! 👍
Thanks! this video help so much
simple, thanks alot
Thanks again sir, aaaa masyaaAllah ❤ the tutorial simple and there is no problem 👍🏻✨
Thankyouu so muchh
Thank you so much, you saved my day
Thank you so much sir
You are a lifesaver bro
Thank you 🥰🥰
Thank you so much
it really helped us
Thanks a lot that helped me
Glad to hear that
Did your PDF file upload
Thank you!
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
nice
Thanks ❤
Thank you so much, it worked fine with me at laravel" ^8.12" 😍
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
good Job bro
amazing
It's awesome and appreciated, would be great if you share source code link :)
thanks
any advice to able open pdf and image file ? with javascript or other ?
With the same code you will be able to open pdf and image file
@@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
i fix it, the cant read special character on file name so its error
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
Varchar
@@WebTechKnowledge thank you so much
YOU ARE GOD
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.
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
if($image)
{
..image code to save image
}
Thanks, what about edit, and update. Do you have a tutorial for that ?
Nice, but show how to do file validation, extentions and size, for video not more then 400mb and etc.
Hip picure a situation where i only want to preview part of the file (eg only page one). How do i approach that
I thought you use Illuminate\Support\Facades\Stroage instead of Illuminate\Support\Facades\Storage;.. But why still not facing an error?
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
hey bro great work but i have a small problem in view and download always page not found
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.
@@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
@@zigaba give me your gmail address. i will send you the source code .
@@WebTechKnowledge postetunisienne99@gmail.com
and thank you very much
Check your email. I send the source code
I get this error "Call to undefined method Symfony\Component\HttpFoundation\BinaryFileResponse::header()"
hi hope u found the solution and still remember it, can u help me hhhhh
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
Route::get('/view/{is}',[PageController::class,'view']); if i have to file in which i use view how i can differentiate it
Undefined variable $data
what should i do to fix this?thanks
Same problem, did u fix it?
Please can you help me out (Method App\Http\Controllers\PageController::uploadproduct does not exist.)
My view function is working, but the pdf file is not opening. It's remaining blank
Same as mine, have you got the solution?
public\assets folder not found when download and view
Class "App\Models\Product" not found in your source code
Sir view and download are not found . I have created both function and viewfile also
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.
Hey , i have comment the source code in the first comment . Check it out . It might help you
please tell how to get/ extract the contents of uploaded file in laravel?
Do you want to show the data of the uploaded file?
@@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.
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
thanks for the video......but it doesnt work for docx....docx file isnt displayed...instead it automatically gets downloaded
me too
@@WebTechKnowledge Me too. How can i fix it?
@@blank_7593 you cannot display doc file in browser . browser do not support doc file
@@WebTechKnowledge how about when I have more than 1 file how can i download the specific 1?
sir can you remake this video
Sure I will soon
downloaded but not the pdf file
can i have source code?
but this video is not for upload video
Hai can you send me the whole code for this ? It’s urgent
Give your mail
@@WebTechKnowledge sitinurnabilaabdulrashid@gmail.com
Check your mail. I have send the source code
@@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
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.
Thank you so much sir.
Thank you!