Giter Site home page Giter Site logo

PDF not showing about ulearn HOT 7 CLOSED

Kipcubic avatar Kipcubic commented on August 22, 2024 1
PDF not showing

from ulearn.

Comments (7)

amitad16 avatar amitad16 commented on August 22, 2024 1

I was facing the same problem with every file. Your storage might not be linked.

Type:
composer dump-autoload

php artisan storage:link

This might solve the issue for the application cannot read any uploaded files.

And for the @Kipcubic issue:

In the Controllers/CourseController.php file, in the readPDF method :

Replace this line

$file = Storage::url('course/'.$file_details->course_id.'/'.$file_details->file_name.'.'.$file_details->file_extension);

with this:
$file = public_path('storage/course/'.$file_details->course_id.'/'.$file_details->file_name.'.'.$file_details->file_extension);

and this line:

with this:
return response()->file($file);

This solved it for me, might work for you as well.

from ulearn.

Swapnil511994 avatar Swapnil511994 commented on August 22, 2024

I'm facing the same issue with video files as well as audio items etc

from ulearn.

ramkumarkushavah avatar ramkumarkushavah commented on August 22, 2024

@amitad16
Thank you so much for sharing the solution.
I am able to solve the PDF related issue.
But till now not able to solve the banner and video upload issue.
Even I have tried you suggestion.
If you have the proper code, please share.[Zip File]
My mail id is : [email protected]

from ulearn.

JayMJ avatar JayMJ commented on August 22, 2024

Hi @amitad16 , I am also facing same issue, even after linking the storage, cold you pls share the zip with me too ? my email is [email protected]

from ulearn.

habe90 avatar habe90 commented on August 22, 2024

php artisan storage:link

GET http://www.localhost/storage/course/3/raw_1609688970_intro-16096889704882.mp4 404 (Not Found)

from ulearn.

thanh-it38 avatar thanh-it38 commented on August 22, 2024

@amitad16 Cảm ơn bạn rất nhiều vì đã chia sẻ giải pháp. Tôi có thể giải quyết vấn đề liên quan đến PDF. Nhưng cho đến bây giờ không thể giải quyết vấn đề tải lên biểu ngữ và video. Ngay cả tôi đã thử đề xuất của bạn. Nếu bạn có mã phù hợp, vui lòng chia sẻ. [Tệp Zip] Id thư của tôi là: [email protected]

hello, have you fixed the error, if so can i ask for the zip file, thank you very much

from ulearn.

thanh-it38 avatar thanh-it38 commented on August 22, 2024

Tôi đã gặp phải vấn đề tương tự với mọi tệp. Bộ nhớ của bạn có thể không được liên kết.

Kiểu: composer dump-autoload

php artisan storage:link

Điều này có thể giải quyết vấn đề ứng dụng không thể đọc bất kỳ tệp nào đã tải lên.

Và đối với@Kipcubicvấn đề:

Trong Controllers/CourseController.phptệp, trong readPDFphương thức:

Thay thế dòng này

$file = Storage::url('course/'.$file_details->course_id.'/'.$file_details->file_name.'.'.$file_details->file_extension);

Với cái này: $file = public_path('storage/course/'.$file_details->course_id.'/'.$file_details->file_name.'.'.$file_details->file_extension);

và dòng này:

Với cái này: return response()->file($file);

Điều này đã giải quyết nó cho tôi, cũng có thể làm việc cho bạn.

I can't view pdf, video and audio files please help me

from ulearn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.