How to upload documents (.doc, .pdf, .xls), to make them downloadable

silexian

Joined: 2007-08-07
Posts: 4
Posted: Tue, 2007-08-07 08:26

Hello

I would like to add additionnal documents to the gallery.
Of course, it is primary intented to store media files, but I would like to add other documents and make them downloadable.

The thumb may be the usual thumb as we could see in windows (ex: Adobe logo for .pdf files), and the thumb would lead to download or open the file.

I tried to upload a simple PDF file, but it broke my test album (the file was more or less uploaded but there were php exceptions and error displayed) :(

Is it possible ? Is there any module out there ?

Regards
Silexian

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25953
Posted: Tue, 2007-08-07 15:02

Any items can be added to gallery.
http://codex.gallery2.org/Gallery2:How_to_Add_Items
depending on your graphics toolkit it will make thumbs for you. If not then a default will be made or you can create your own.
Some themes have a download link and other don't.
What was the error you saw when you added items?
URL?
Here is a example of a PDF where the toolkit makes a thumb and resize of the original document:
http://gallery2.ca/v/gallery-dev/testing/main.pdf.html
That theme NZDI has a download link as well.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
silexian

Joined: 2007-08-07
Posts: 4
Posted: Tue, 2007-08-07 15:39

I'll give the error messages later (when I come back to home, for another test).

By the way, Floridave, which image tool do you use (which versions in which order)?

I only use have on my server GB2. I could use only an old version of ImageMagick (6.0.7 instead of current 6.2.4), but there isn't the PDF Mime format for that version of ImageMagick.

Silexian

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25953
Posted: Tue, 2007-08-07 15:56

toolkits and priority:
ffmpeg
mplayer
IM
NetPBM
GD

IM version: 6.2.4 supports:
image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/pdf
application/postscript
application/photoshop
image/x-photo-cd
image/tga
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

Not sure of the NetPBM verson but supports:
image/jpeg
image/pjpeg
image/gif
image/png
image/tiff
image/bmp

So in my install NetPBM would never get used.
There is a security issue with IM 6.2.4 but I am the only one adding items so it is not a issue for me.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
silexian

Joined: 2007-08-07
Posts: 4
Posted: Tue, 2007-08-07 16:30

Great !
you seem to be up to date.

I have submitted a ticket to my hosting provider to update IM.
If I get a negative answer, I'll upload the IM binary, as I've done with ffmpeg, which has been uploaded in the Gallery2 directory.

note : uploading a binary in the linux world is not totally efficient. You never know on which platform the binary has been build and what are its dependancies ... You have to test !

Silexian

 
dsanchez

Joined: 2006-08-23
Posts: 12
Posted: Thu, 2009-06-11 14:50
floridave wrote:
Here is a example of a PDF where the toolkit makes a thumb and resize of the original document:
http://gallery2.ca/v/gallery-dev/testing/main.pdf.html

What toolkit are you using to get that preview with the PDF? Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25953
Posted: Thu, 2009-06-11 23:56
Quote:
IM version: 6.2.4 supports:
image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/pdf
application/postscript

application/photoshop
image/x-photo-cd
image/tga
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

You need ghostscript on the server and imagemagick compiled with pdf support (IM must be aware of ghostscript). Ask host for support in this regard.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team