Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2015-09-24 07:14:52

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: File already exists error message

Hi adi, I was simply thinking along the lines of an extra file custom field (e.g. before the description textarea) where I can add the image ID# of an image to be displayed alongside the file download, plus a corresponding txp:tag to output that field.

Use case: I’d like to show the covers of documents available for download so that people have a visual indication of which file it is. For the moment I was envisaging prepping and adding the image manually to the image tab. I have seen that google doc’s previewer can return a jpg of a pdf page:

https://docs.google.com/viewer?a=bi&pagenumber=1&url=http://www.domain.com/path/to/myfile.pdf 

but in tests it wasn’t always consistent and the file it produces is generally large – plus it doesn’t handle all file types (e.g. docs/docx only sometimes). Perhaps there are other pdf-to-jpg/png libraries out there, I’m not sure.


TXP Builders – finely-crafted code, design and txp

Offline

#14 2015-09-24 23:13:36

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: File already exists error message

jakob wrote #295101:

I was simply thinking along the lines of an extra file custom field (e.g. before the description textarea) where I can add the image ID# of an image to be displayed alongside the file download, plus a corresponding txp:tag to output that field.

That aligns pretty much with what I had written down. Will have a look at implementing it … at some stage.

Offline

Board footer

Powered by FluxBB