A filemanager
field is a replacement for the
regular file
field. Instead of opening a file browser
letting users upload a file from their own computer, the
filemanager
field will open the TinyMCE
FileManager in standalone mode, allowing the user to either
pick a file from the already uploaded files, or upload a new file and
pick that one.
Implementation is as trivial as any other type:
<field id="file" type="filemanager" multiLingual="0"> <title lang="en">File</title> <title lang="da">Fil</title> </field>
When retrieving a field of this type via an M2_Content::get() call you get back an array that looks pretty much like the ones you get for file or image types - it has the following keys:
web_path
- the path to the file, ready for use
in a link.
bytes
- the size of the file in bytes.
mime
- the mime type of the file.
There are a couple of things to bear in mind when you choose the
filemanager
type over the regular file
type
- the pros and cons are listed here:
Table 33. Pros and cons of the filemanager field type
Pros | Cons |
---|---|
|
|
Remember that you can not access these files with filesystem functions, as they are really proxied from the administrative pages, just like any other binary file in Moski2.net.