RedmineAttachedFiles » History » Version 7

Mischa The Evil, 2013-11-17 07:33
News can hold attachments too starting from r8728 (1.4.0).

1 1 Mischa The Evil
h1. Redmine Attached Files
2 1 Mischa The Evil
3 1 Mischa The Evil
{{>toc}}
4 1 Mischa The Evil
5 1 Mischa The Evil
h2. Introduction
6 1 Mischa The Evil
7 2 Mischa The Evil
Attached files can be added to different resources within the Redmine system:
8 2 Mischa The Evil
* issues - using the [[RedmineAttachedFiles#Attach-files-form|"New File" form]] while adding/editing an issue
9 2 Mischa The Evil
* documents - using the [[RedmineAttachedFiles#Attach-files-form|"New File" form]] while adding/editing a document
10 2 Mischa The Evil
* forum messages - using the [[RedmineAttachedFiles#Attach-files-form|"New File" form]] while adding/editing a forum message
11 7 Mischa The Evil
* news items - using the [[RedmineAttachedFiles#Attach-files-form|"New File" form]] while adding/editing a news item
12 2 Mischa The Evil
* wiki pages - using the [[RedmineAttachedFiles#Files-added-via-New-File|"New File" link]] at the bottom of the page
13 1 Mischa The Evil
14 1 Mischa The Evil
h2. Usage
15 1 Mischa The Evil
16 1 Mischa The Evil
h3. Inline Images
17 1 Mischa The Evil
18 1 Mischa The Evil
Attached files can be shown within the parent page by targeting it's name via image url (i.e. @!attached_image!@).
19 1 Mischa The Evil
20 1 Mischa The Evil
h3. Non plain text files
21 1 Mischa The Evil
22 1 Mischa The Evil
Keep in mind there is a dedicated [[RedmineDocuments|documents]] module for storing technical and user documentation that can be linked via the [[RedmineWikis|wiki]] and a dedicated [[RedmineFiles|files]] module for publishing versions of the tracked project, as a bundle (release).
23 1 Mischa The Evil
24 1 Mischa The Evil
However, if that doesn't fit the bill, file upload support provides a way to distribute any file for user download.
25 1 Mischa The Evil
26 1 Mischa The Evil
h2. File storage
27 1 Mischa The Evil
28 3 Etienne Massip
Uploaded attached files are stored in @<Redmine install dir>/files@ directory subdirectories named after the year the file has been uploaded.
29 1 Mischa The Evil
30 1 Mischa The Evil
The uploaded file name is prefixed with a unique id based on it's parent for directory storage. Multiple files can be uploaded with the same name, however a link within the wiki will only show the most recently uploaded one.
31 1 Mischa The Evil
32 5 Etienne Massip
h4. Unattached uploaded files
33 5 Etienne Massip
34 6 Etienne Massip
Uploaded files can be left unattached if the user don't submit the form; a [[RedmineRake#rake-redmineattachementsprune|Rake task]] is made available and can be scheduled for regular deletion of these files.
35 5 Etienne Massip
36 1 Mischa The Evil
h2. Attach files form
37 1 Mischa The Evil
38 4 Etienne Massip
The input form is as shown below.
39 1 Mischa The Evil
40 4 Etienne Massip
Starting from version version:2.3.0 and depending on the browser supporting it (IE10+), it is possible to:
41 4 Etienne Massip
* select and attach multiple files at once
42 4 Etienne Massip
* drag and drop files over the form
43 4 Etienne Massip
44 4 Etienne Massip
The optional description field, which appears once the file upload is finished, is also used as the alternate text of the image file inserted using @!image_url!@ syntax within the parent content (i.e. issue description or note, forum message, wiki page, document, &hellip;).
45 1 Mischa The Evil
46 1 Mischa The Evil
!UploadFile.png!
47 1 Mischa The Evil
48 1 Mischa The Evil
h2. Files added via "New File"
49 1 Mischa The Evil
50 1 Mischa The Evil
At the bottom of many of the pages in Redmine is a "New File" link. Attaching a file makes that page the parent of the file and it is limited in scope to that page.
51 1 Mischa The Evil
52 1 Mischa The Evil
See the [[RedmineFiles#Usage|Usage]] section for more information.