Files management & accessesThis article only concerns dynamic files (images, medias, ...) Contents files are the files indexed by database rows.
File fieldMimes & extensionsThe mime type is contained in the header file. If a user change the extension, still the application recognize the file's original type. Know issue : Mime detection is not working on your server: Cook is trying various ways to read the mime type, but still it is possible that none of the proposed methods works. Field properties
You can add or remove files types.
Protected filesUsing indirect mode, the full path is never revealed, so the user cannot know where the physical file is stored.
How it works ?Instead of calling the image with its file name, it call the component engine : index.php?option=com_mycomponent&task=file...&path=[DIR_MYALIASDIRECTORY]/myimage.png Then the component analyse the query and return the file bit per bit with corresponding headers.
Directory aliasesYour component has registered a list of directory aliases, wich contain the full base paths. Per default, the directory alias are constructed following this rule : [DIR_TRIAD_FIELD] TRIAD is the table alias (plural alias) Very important : This documentation expose the default name convention. Open the component configuration
Then choose a directory path.
You can use predefined aliases : [ROOT] : Joomla root Aliased path$path is an aliased string: Alias directory + file relative directory + file name + extension Example: [DIR_FILES_IMAGE]/2014-03/myimage.png Note : The relative directory can be created with the 'renaming' rules of your file at upload. (see uploader)
Building the urlCook offer you the possibility to build the image link automatically from a static helper call.
|
|
This is what you call a component builder. I was able to master using this in a very short time and the resulting component works like a charm. Not just a basic component builder but a fully working component builder with forms fields tables all ready to go. You can make the list and item views to display in the front and back end. Also there is a great forum just starting to evolve and I'm sure this will grow very rapidly when you all realise how good this tool is.


