Questions answered by this recipe
How can I display the size of attached files?
Custom markup to get the file size of attached files
To install this recipe:
- download Attach:AttachSize.phpΔ
- copy it to your cookbook directory
- add in your
To use, simply use this markup:
- File sizes are all returned as the nearest whole number of KB, or the number of bytes below 1KB. It doesn't show MB, but then attachments are generally not that large anyway. Possible future enhancements could improve this.
- Formatting is hard-coded.
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
- 0.1: Initial release
- 0.2: Cross-group attachment checking, can't get info on existence/size of non-attachments any more
See discussion at AttachSize-Talk