Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Show attachments = 0, posted by Eric Quintero on Wed Aug 12 23:44:16 2015 
    icon2.gif   Re: Show attachments = 0, posted by Stefan Ritt on Thu Aug 13 08:41:57 2015 Screen_Shot_2015-08-13_at_8.43.40_.png
       icon2.gif   Re: Show attachments = 0, posted by Eric Quintero on Mon Aug 31 17:14:08 2015 
          icon2.gif   Re: Show attachments = 0, posted by Eric Quintero on Fri Oct 16 00:24:50 2015 
Message ID: 68146     Entry time: Fri Oct 16 00:24:50 2015     In reply to: 68105
Icon: Reply  Author: Eric Quintero  Author Email: ericq@caltech.edu 
Category: Question  OS: All  ELOG Version: 3.0.0-70b274b 
Subject: Re: Show attachments = 0 

Hm, looking through the source, there are many many places where PDF files are treated differently than strictly image filetypes (PNG, etc.). This makes sense in the context of multi-page documents. 

Still, I like using PDFs for vector plots... I suppose I should also confess to the following modification I've made to my ELOG for treating PDFs like images in drag-and-drop uploading. 

--- a/scripts/ckeditor/plugins/dndfiles/plugin.js
+++ b/scripts/ckeditor/plugins/dndfiles/plugin.js
@@ -142,7 +142,7 @@ CKEDITOR.plugins.add( 'dndfiles', {
                                                                return;

                                                        if(src.indexOf(".png") >= 0 || src.indexOf(".jpg") >= 0 || src.indexOf(".jpeg") >= 0
-                           || src.indexOf(".gif") >= 0 || src.indexOf(".svg") >= 0) { // This is an image
+                           || src.indexOf(".gif") >= 0 || src.indexOf(".svg") >= 0 || src.indexOf(".pdf") >= 0) { // This is an image
                                                                html += '<a href = ' + src + '><img src = "' + thumb + '">' + '</a>';
                                                        } else {        // this is not an image
                                                                // Server appends 14 characters in front of the name so we should remove them

ELOG V3.1.5-fe60aaf