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.
|
|
“
”
Great UX great performance and definitely a time saver. It only took me 10 minutes of playing around before purchasing a subscription and right now I just want to throw more money at you! I just started a new project and after just 4h I can already tell it probably saved me several days of work.
I'm building a wholesale ordering system with sales rep management.
I have not looked at the code yet but so far: impressive.


