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 propertiesYou 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 really a brilliant service. I'm sure it will become very popular and bring you a lot of well deserved success. Congratulation !