- Table of contents
- Managing Files
There are a variety of ways to upload files for a project. The distinctions among these can be a bit blurry. In general, there is no wrong way to handle files -- but some options may be better suited to a particular requirement.
| Only available from the wiki page
Deleted if the wiki page is deleted
|Links to the document page, not the document itself|
|Files||direct url only|
The most common way to upload files is as a wiki page attachment. When editing a wiki page, a file upload input will appear at the bottom of the form.
This is mostly used for images, which can be displayed inline using the file name:
But this area is not restricted to images; any kind of file can be uploaded here. A link to download the attached file can be generated with:
This produces seiscode_wiki_upload.png
The main disadvantage of this method is that the file is only available from the wiki page. It can't be linked from another page.
The Documents module is intended for downloadable files that are broader or should be more prominent than a wiki attachment. These files are listed in their own project area, and each file gets its own descriptive wiki page.
A link to a document can be made in any wiki page with:
Note that this links to the document page rather than the document itself.
The Files module is the most straightforward way to upload files.
While it is convenient, this module is really designed for distributions -- ie. executables, libraries, etc. -- and has some limitations as a result. The main drawback is that there is no shorthand for linking to a file; it can only be linked by a direct url.
Any uploaded file can be linked using a direct URL, eg.
This can be used with Wiki attachments and Documents to get around some limitations of their shorthand links (eg. the link can be used from anywhere, and goes directly to the file). It is the only way to link to Files.
The main disadvantage of this approach is that the target of the URL is immutable. The
/324/ part of the URL here is a unique id given to the uploaded file. Deleting this file and uploading another file with the same name would produce a new id, hence a different URL. There is simply no way to change the uploaded file without modifying every link that points to it.