Keyword

Problem downloading article attachments

  • Vicente Gavara
  • Vicente Gavara's Avatar Topic Author
  • Offline
  • New Member
More
12 years 11 months ago - 12 years 11 months ago #58004 by Vicente Gavara
Problem downloading article attachments was created by Vicente Gavara
Hi all:

I'm having problems when downloading files attached to K2 articles, specifically xls, ods (LibreOffice) and zip files... well, in fact the only attachments that download right are those with .pdf extension, all other fail. These are the symptoms and the result of some tests:


- Backend upload process works fine
- Uploaded files, located in <root>/media/k2/attachments, download right when done directly from the server directory
- Downloading from k2 backend or from website frontend modifies the contents of the file keeping the same size. As a result, file open process fails.
- Mime type is properly managed when downloading: I've tested it changing the MIME type associations in <root>//administrator/components/com_k2/lib/class.upload.php and associated file program changes accordly (for instance, if I set as MIME="application/pdf" to xls extensions, browsers try to open the downloaded file with pdf reader)
- Tested in Joomla 1.5 with k2 2.1
- Tested with Safari and Firefox browsers

Summarizing, the key fact is this: File contents -but not size- are changed when I try to download a file with an extension different to pdf.

I've tried to find a solution browsing in K2 forums with no luck. At this point I'm locked, so any help will be really appreciated.

I attach two xls files: The fist one (hello_world.xls) is the original that works fine, the second one (hello_fkin_world.xls) is the same file after being uploaded and then downloaded (same result doing it both from Safari and Firefox)

Regards.


Attachment not found



Attachments:

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

More
12 years 8 months ago #58005 by Novalee
Replied by Novalee on topic Re: Problem downloading article attachments
did somebody find a solution yet?

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


Powered by Kunena Forum