cancel
Showing results for 
Search instead for 
Did you mean: 

Dropped PDF files appear as "plain" files.

OlivierM_
Star Contributor
Star Contributor

Whenever I drop (native method) a PDF document on my new 5.5 Nuxeo DM, it is uploaded as "binary" (default icon). Hence Preview failing.

But when I import the same PDF file in the same space through the "Import file" feature, it appears with a nice PDF icon, preview works greats, and so on...

Question is : is this supposed to happen?

1 ACCEPTED ANSWER

OlivierM_
Star Contributor
Star Contributor

Ok, here is a little summary on the problem, I'm about to find the solution.

  1. It's clearly on my side, and not on Nuxeo's.
  2. It has to do with my Firefox profile. Other profiles or other browsers don't have the problem.
  3. While it should send PDFs with the right MIME type, it sends them as application/force-download

Found a little bit of information about that kind of problem here : http://techblog.procurios.nl/k/news/view/15872/14863/Mimetype-corruption-in-Firefox.html

So I looked into my mimeTypes.rdf, and found this :

<RDF:Description RDF:about="urn:mimetype:application/force-download" NC:fileExtensions="pdf" NC:description="Adobe Acrobat 7.0 Document" NC:value="application/force-download" NC:editable="true"> <NC:handlerProp RDF:resource="urn:mimetype:handler:application/force-download"/> </RDF:Description>

I'm not sure yet where it comes from, but I'm pretty sure deleting this RDF triple could to the trick. Testing it...

Edit: tested it ok, it works. If anyone stumbles onto the same problem, just delete the RDF triple linking your filetype to application/force-download in mimeTypes.rdf (in your FF profile), and you should be going.

View answer in original post

12 REPLIES 12

Florent_Guillau
World-Class Innovator
World-Class Innovator

No it's not, and it works all right for me. What platform are you on? Does your PDF have a proper .pdf extension?

OlivierM_
Star Contributor
Star Contributor

Yes they does. Is this supposed to work on file extension?

Roland_Benedett
Star Contributor
Star Contributor

Same here. No problem of this sort on the 2 clean instals I just did.

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Did you install drag'n drop extension or did you use the HTML5 ones ?

If you download the file drag'n dropped, do you find your document ?

Can you add in your $TOMCAT/lib/log4j.xml after this:

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false" threshold="null">

with this following lines:

<appender name="TMP" class="org.apache.log4j.DailyRollingFileAppender">
  <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
  <param name="File" value="${nuxeo.log.dir}/tmp.log" />
  <param name="Append" value="true" />
  <!-- Rollover at midnight every day -->
  <param name="DatePattern" value="'.'yyyy-MM-dd" />
  <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c] %m%n" />
  </layout>
</appender>

<category name="org.nuxeo.ecm.platform.filemanager">
  <level>DEBUG</level>
  <appender-ref ref="TMP" />
</category>
  • restart your server
  • do the drag'n drop action
  • copy here the $Nuxeo/log/tmp.log content as comment here

We will try to see which file manager you are using.

Thanks for your answer. First of all, I'm using the native way (HTML5, NOT the extension).

When I import a PDF I get

Whoops, this is Win XP and FF 8.

Ok the truncation is not the issue. When I add a PDF with a long name I get for instance

So apparently the MIME type passed during the drop is incorrect. Could you run a network trace with Wireshark here to find out what's sent by Firefox to Nuxeo? You should see a

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.