Keyword

Attachments problem

  • Jakub Jedynak
  • Jakub Jedynak's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 5 months ago #81829 by Jakub Jedynak
Attachments problem was created by Jakub Jedynak
I have a big problem with attachments (pdf).When I add attachment to the item it seems it's uploaded (it takes a while), but after that folder on server is empty, and in the item's attachments table only title of the attachment apperas and the file cell is empty.On the frontend when I try to download file it says "File does not exist".I tried on my local sever, and on live one - both times the same effect. :( Anyone can help?

Please Log in or Create an account to join the conversation.

  • Jakub Jedynak
  • Jakub Jedynak's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 5 months ago #81830 by Jakub Jedynak
Replied by Jakub Jedynak on topic Attachments problem
Anyone, please?

I discovered that i have this problem with the PDF's only. Text documents (txt, doc etc.), ZIP archives and other files works fine. The only ones that makes problems are PDFs (tried with different pdf's files).
I have 'pdf' on the list of allowed files in administration area, so I don't know what's wrong :-(

Please Log in or Create an account to join the conversation.

  • Jakub Jedynak
  • Jakub Jedynak's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 5 months ago #81831 by Jakub Jedynak
Replied by Jakub Jedynak on topic Attachments problem
After many tries I dicovered that I can upload PDF's in IE and Opera, but not in Firefox. What's wrong with attachments option in K2? It drives me mad!

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #81832 by left19
Replied by left19 on topic Attachments problem
Yes, I have the same issue. Thanks for the answer to it. Anyone know how to get firefox to do this????

Qbin2001 said:
After many tries I dicovered that I can upload PDF's in IE and Opera, but not in Firefox. What's wrong with attachments option in K2? It drives me mad!

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #81833 by Davina
Replied by Davina on topic Attachments problem
Same here - does anyone know what might be causing this problem when uploading in Firefox? It's very frustrating.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #81834 by Kris
Replied by Kris on topic Attachments problem
Solved!! (Joomla! 1.6 - Firefox 5 - K2 SVN (aka v2.5))

Firefox changes application type for PDF files when uploading.

It uses "application/x-octetstream" (seen in Firebug) instead of "application/pdf"

To allow this type, you must edit the next file :

root/administrator/components/com_k2/lib/class.upload.php

 

Line 2196-2197 Before :

         "application/pdf",         "application/plain",

Line 2196-2198 After :

         "application/pdf",         "application/x-octetstream",         "application/plain",

 

It may be a Security issue from now on to know what kind of files are allowed by this recent added line, in order to prevent undesired uploaded files, xploits, etc..

 

But it works for PDF in Firefox.

 

Cheers

Kris

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum