Welcome Guest, Not a member yet? Register   Sign In
Runtime mimes.php generation
#1

Is there a way to change mimes.php during run-time so that it can accompany run-time allowed_types generation?

It would be preferred to do this using a helper from application.
However $CI =& get_instance(); does not work in mimes.php
Reply
#2

Yes, you can rewrite the file before loading it, but I still (after the GitHub conversations) don't understand why you want to do this at runtime instead of having a proper configuration from the start.
Reply
#3

We are using CI as a base for FABUI (FABtotum 3D printer on-board web interface).

New plugin system has the ability to extend supported file types. As the whole system is running on a custom build and optimized linux,
there are strict policies which parts of the filesystem are RO/RW.

- The first reason or going for a runtime/on-the-fly generation is that we don't know at this point what file type support will be added by new plugins (user created).
- Second reason is that that the web files are in the read-only section of the filesystem and if modified by overlay mechanism it would create problems for updates. So is best if no files are modified with a new plugin being activated/deactivated.

The mimes.php could be regenerated "physically" every time a plugins is activate/deactivated but I would really like to avoid that as it would cause other problems.
Reply
#4

Types you allow is not the same thing as types you know ...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB