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.
|
|
Real time saver and great Component Builder tool ! I have been developing with J-Cook Pro Component Builder for several months now and can say with all honesty that this product/service is second to none. The product is feature rich and is being improved and added to all the time. Do yourself a favor if you need to build a Joomla! Component then you can do no wrong in trying the product. You will save on time and effort while being able to deliver your project on time. J-Cook pro does the hard work for you you then have the freedom to fully customise the end result for your own needs.
One word: Awesome.