Posted 19 October 2011 - 02:38 AM
just because it's not part of Yii and hasn't been discussed yet. Are there plans for a kind of file storage component in Yii 2.0?
If a component, module or extension has to deal with files it may be useful if there would be a framework component helping them.
Basically this would be similar to a cache module, you may set or get files from the file storage component, but it may implement additional boundaries, if a module wants to store its files protected, so another module can't access it.
Also the file storage could come with a convention where to store the files (e.g. protected/data, protected/var).
Posted 19 October 2011 - 01:51 PM
For sure you could still access files directly with PHP methods, but that's also true for other framework components, such as messages or authItems.
Additionally you could replace the component to implement another file storage (e.g. in a database, CDN).
At least I would like to see a convention like the /assets folder where the web application should store persistent files. My proposal would be protected/data or protected/var.
PS: Same could be asked for CHttpSession or the Cache components
Posted 20 October 2011 - 05:59 PM
- better error handling
- automatic creation of subdirectories
- improved organization on file / folder basis, like .git/objects
- delete to trash, empty trash
- getting files by attributes (like find)
...just thinking loud.