I am trying to print html as pdf with laravel-snappy, its working for the most part. But My application have a lot of chart.js charts.
I cannot get the charts to print to pdf. There a number of reasons why, most of which I have exhausted.
Apparently the main reason is not having the chart.js file required by its absolute path.
With my laravel app on an AWS ec2 instance I cannot access files via their absolute path using:
)
I receive the error 404 not found. I can only access files through domain names like http://localhost/ etc using:
On my local machine I get the slightly more descriptive error that the browser is not allowed to access the file system.
I have views set up for browsing, I have duplicated these into a PDF folder, these will have absolute paths and a more simpler html page. When I user wants to print the page they are on, it wont actually print that page but an optimized version for pdfs.
The application sits on an AWS ec2 server set up with ElasticBeanstalk.
Is this a laravel issue? An AWS issue? How do I set my server or application up to allow access to the public folder via its absolute path?
What does this mean for security?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire