Page 1 of 1
Upload PDF File
Posted: Wed Apr 30, 2008 6:09 am
by axelseaa
I'm trying to upload a PDF file and create a link to it in an entry. What is the best way to do this? I can upload the pdf with the "Add Media" option, but when I try to insert it into the entry with the image option, picking link only, it doesn't work. Any thoughts?
Posted: Wed Apr 30, 2008 4:52 pm
by judebert
You should have a "Media" button above your editor. It should do what you want. I know it's worked for me with .zip, .tar.gz, and .xcf files.
The WYSIWYG editor might validate or rewrite the URL or something; try the non-WYSIWYG editor and see if it makes any difference.
Posted: Thu May 01, 2008 2:53 am
by axelseaa
judebert wrote:You should have a "Media" button above your editor. It should do what you want. I know it's worked for me with .zip, .tar.gz, and .xcf files.
The WYSIWYG editor might validate or rewrite the URL or something; try the non-WYSIWYG editor and see if it makes any difference.
How is that possible? When i try without the WYSIWYG editor, it tosses in the following:
Code: Select all
<a class='serendipity_image_link' href='/s9y/uploads/GradParty.pdf'><!-- s9ymdb:14 --><img width="" height="" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="/s9y/uploads/GradParty.serendipityThumb.pdf" alt="" /></a>
which is not even correct, because its not an image.
Any other suggestions?[/code]
Posted: Thu May 01, 2008 2:05 pm
by garvinhicking
Hi!
Which PHP version do you use? The recogintion whether a media file is an attachment or image makes use of the PHP getimagesize() functionality.
Plus, I assume you are using s9y 1.3?
Regards,
Garvin
Posted: Thu May 01, 2008 3:38 pm
by axelseaa
garvinhicking wrote:Hi!
Which PHP version do you use? The recogintion whether a media file is an attachment or image makes use of the PHP getimagesize() functionality.
Plus, I assume you are using s9y 1.3?
Regards,
Garvin
Currently we have php 5.2.0 installed, I have not yet had a chance to install 1.3 - currently still on 1.2.1
Posted: Thu May 01, 2008 4:10 pm
by judebert
I just tried it on my installation, and it recognized an mp3 was not a file and added it as a plain anchor. None of that s9ymdb stuff.
It obviously believes it can make a thumbnail from the file. Problem is, the thumbnail is empty. If you can delete the thumbnail, it might work as expected. (The thumbnail is filename.s9ythumb.pdf, in the same directory as the file.)
The second attempt would be to actually give it a thumbnail, although not necessarily a true representation of the file.
If that works, then we can start wondering why it created the thumbnail in the first place.
Posted: Thu May 01, 2008 8:04 pm
by garvinhicking
Hi!
Thumbnails for PDFs are created when imagemagick is used. usually the s9y code should detect if a PDF thumbnail is used.
I couldn't reproduce this here, it might also be an issue of how the serendipity_images DB table looks like and its mimetype in there. It would be quite easier if I could get a hold on the FTP of the affected installaation...?
Regards,
Garvin