Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hminnovation/b3746ab1a398a1e4f062ca32c99d5c0c to your computer and use it in GitHub Desktop.
Save hminnovation/b3746ab1a398a1e4f062ca32c99d5c0c to your computer and use it in GitHub Desktop.
Couldn't find this documented in the docs or elsewhere...
Using the following in a model:
`download = DocumentChooserBlock(icon='fa-download', template='blocks/download.html')`
You'd need to use something along the lines of:
`<div class="download"><a href="{{ self.url }}">{{ self.title }}</a></div>`
note: title isn't the uploaded document's title (e.g. filename) but rather the title added at the point of uploading.
@johnbxu
Copy link

johnbxu commented Oct 9, 2020

Hi, have you ever been able to find how to display the file size of a document object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment