Upload PDF File
Upload PDF File
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?
How is that possible? When i try without the WYSIWYG editor, it tosses in the following: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.
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>
Any other suggestions?[/code]
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
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
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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Currently we have php 5.2.0 installed, I have not yet had a chance to install 1.3 - currently still on 1.2.1garvinhicking 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
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.
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.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
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
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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/