GithubHelp home page GithubHelp logo

zeelot / kohana-media Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 13.0 241 KB

Taking advantage of the Kohana CFS for serving media files. Will write files to a web accessible directory for performance.

PHP 100.00%

kohana-media's People

Contributors

kiall avatar luwe avatar shadowhand avatar zeelot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kohana-media's Issues

Use it with head.js

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?

http://headjs.com/

thanks.

Creation of cache folders with multiple media-files fails first time

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

Where are the 304 headers?

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?

Serving media files from within a vendor directory?

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! :-)

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.