Adding size of file to the DL link
Bug #255233 reported by
Richard H.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Document Library |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
A wishlist item for the future; we might wish to add the size of the file to the list of metadata/properties that appear within a generated DL link.
File sizes can be important depending on the speed of your connection to the Internet, and knowing that you're downloading a large or a small file could be worth knowing before you click on the download.
Of course, the problem is that we offer up to three different versions of the download, so we'd have to think carefully about how we could do this in regards to the DL link layout.
tags: | added: augment |
Changed in documentlibrary: | |
status: | New → Fix Committed |
Changed in documentlibrary: | |
status: | Fix Committed → Confirmed |
Changed in documentlibrary: | |
importance: | Undecided → Wishlist |
Changed in documentlibrary: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This now works. The following has been done:
* hurry.file has been extended so that the file size can be retrieved (both when tramline isn't used and when it is). This was released as hurry.file here:
http:// pypi.python. org/pypi/ hurry.file/
* the OAI-PMH protocol in the Document LIbrary has been extended so that a 'size' attribute is now available on the elements that specify the docuwnload URLs. This is an attribute in bytes.
* A small package was created for transforming a number of bytes into a human-readable file size:
http:// pypi.python. org/pypi/ hurry.filesize/ 0.9
* the DL integration for Silva was extended so that it reads filesize information and reports it.
In order to make this work on the Silva side, a complete reharvest is needed of the information in the DL so that the filesize information is picked up.