Skip to content

Commit d0437fd

Browse files
authored
Merge pull request #960 from ExpressionEngine/file-field-cache-busting
file cache busting and missing icons
2 parents bef85e0 + de043a1 commit d0437fd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/fieldtypes/file.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ A File field allows you to browse through existing files and upload new files.
2525

2626
![file field with file selected](_images/field_file_file.png)
2727

28-
Once a file has been selected in the field, that file can be replaced by clicking the <img style="margin-bottom: 0px; vertical-align: middle; display:inline-block;" src="../../_images/icon_edit.png" alt="edit icon"> icon. The field selection can be cleared by clicking <img style="margin-bottom: 0px; vertical-align: middle; display:inline-block;" src="../../_images/icon_remove.png" alt="remove icon"> icon (this will not remove the file from the system). You can also change the file metadata (such as the title or description) by clicking the <img style="margin-bottom: 0px; vertical-align: middle; display:inline-block;" src="../../_images/icon_edit_meta.png" alt="settings icon"> icon - please note that file's metadata will be changed globally throughout the system.
28+
Once a file has been selected in the field, that file can be replaced by clicking the <img style="margin-bottom: 0px; vertical-align: middle; display:inline-block;"
29+
src="../_images/icon_edit.png" alt="edit icon"> icon. The field selection can be cleared by clicking <img style="margin-bottom: 0px; vertical-align: middle; display:inline-block;" src="../_images/icon_remove.png" alt="remove icon"> icon (this will not remove the file from the system). You can also change the file metadata (such as the title or description) by clicking the <img style="margin-bottom: 0px; vertical-align: middle; display:inline-block;" src="../_images/icon_edit_meta.png" alt="settings icon"> icon - please note that file's metadata will be changed globally throughout the system.
2930

3031
## Field Settings
3132

@@ -170,6 +171,12 @@ The automatically-detected MIME type of the file.
170171

171172
The date the file was last modified. See [Date Variable Formatting](templates/date-variable-formatting.md) for more information.
172173

174+
One powerful use of the modified_date is 'cache busting', forcing browers to use a new image rather than a cached one when an image is modified but not renamed:
175+
176+
{image}
177+
<img src="{url}?v={modified_date}" />
178+
{/image}
179+
173180
### `{path}`
174181

175182
The URL to the folder containing the file, including a trailing slash.

0 commit comments

Comments
 (0)