zeelot / kohana-media Goto Github PK
View Code? Open in Web Editor NEWTaking advantage of the Kohana CFS for serving media files. Will write files to a web accessible directory for performance.
Taking advantage of the Kohana CFS for serving media files. Will write files to a web accessible directory for performance.
Hello,
I have so many js files in my project and the list grows.
I want to use head.js but I did not manage it, will you please make an example for this?
thanks.
As a test, I grabbed Kohana 3.2 and this kohana-media module (dev 1.2)
I created my own module with just a simple css file and in the application folder I created another simple css file.
In the default welcome controller I called up a view which has minimal html with those 2 css files.
The first request (with empty DOCROOT/media folder) would only load either 1 of those 2 css files, the other has internal server error. It seems to randomly load one but not the other. (re-test: clear media folder and refresh again)
Firebug shows that the error comes from where it creates the cache folder:
https://github.com/Zeelot/kohana-media/blob/dev/1.2.x/classes/controller/media.php#L36-40
The media module doesn't appear to send any 304
headers, therefore it doesn't cache anything properly at the browser level. Is this intentional, or just plain broken?
Would you accept a patch for composer.json support?
How would you recommend one go about serving media files (css, js, and images) from within a vendor directory? Specifically, I've got vendor
at the top level (DOCROOT), where it's installed by Composer. I've got a hack working with the following in the Media controller:
if ( ! $cfs_file)
{
echo $cfs_file = DOCROOT.'vendor'.DIRECTORY_SEPARATOR.$filepath;
}
but that does seem pretty hacky. Any suggestions?
Thanks! :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.