Keyword

bUG? Error k2 attachment renames a file when uploaded

  • Vassilis
  • Vassilis's Avatar Topic Author
  • Offline
  • New Member
More
15 years 3 months ago #77229 by Vassilis
Hi,
everytime i upload a file (attachment) like .doc or .rar, .zip etc the system renames the file to something like file.doc.txt instead of file.doc

I am using the latest build of K2.

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

  • Vassilis
  • Vassilis's Avatar Topic Author
  • Offline
  • New Member
More
15 years 3 months ago #77230 by Vassilis
anyone?

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

  • kabeza
  • kabeza's Avatar
  • Offline
  • Senior Member
  • www.beza.com.ar
More
14 years 9 months ago #77231 by kabeza
Hi Vassilis
I'm having the same issue. Didn't try with the latest version 2.3, but I have to fix the already installed 2.2

Look:


If anyone can help us with this...

Custom Joomla templates<br />www.beza.com.ar

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

More
14 years 9 months ago #77232 by Lefteris
Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try:
1. Update K2 to it's latest version. It also updates the specific class to it's latest version.
2. Upload the file from a different browser.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • kabeza
  • kabeza's Avatar
  • Offline
  • Senior Member
  • www.beza.com.ar
More
14 years 9 months ago #77233 by kabeza
Tried with Firefox, Opera and Chrome. All with same result
I think I'll try upgrading to 2.3

Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version.
2. Upload the file from a different browser.

Custom Joomla templates<br />www.beza.com.ar

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

  • Vassilis
  • Vassilis's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #77234 by Vassilis
Hi Lefteris,
i still have teh same problem.
In every K2 site i create.
From every browser and with the latest version...
Any solution plz?

Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version. 2. Upload the file from a different browser.

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

  • kabeza
  • kabeza's Avatar
  • Offline
  • Senior Member
  • www.beza.com.ar
More
14 years 9 months ago #77235 by kabeza
I finally did:

1- backup to jos_k2_*** tables in phpmyadmin
2- backup media/k2 folder in ftp
3- removed k2 v2.2
4- installed k2 v2.3
5- restored sql backup from point 1 (restored the original jos_k2_*** tables)
6- removed .txt from each media/k2/attachtments file (you can do this in your pc with a multiple renamer software)
7- uploaded k2 folder to media/k2 in ftp (overwrote everything)
8- removed .txt manually from each record in the jos_k2_attachtments table

It is a long and kinda complicated process, but I guess it is working fine now
PS: Software still shows v.2.2 in the control panel... I guess we'll have to do another upgrade soon


Vassilis said:Hi Lefteris, i still have teh same problem.
In every K2 site i create.
From every browser and with the latest version...
Any solution plz?

Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version. 2. Upload the file from a different browser.

Custom Joomla templates<br />www.beza.com.ar

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

  • Vassilis
  • Vassilis's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #77236 by Vassilis
Hi Enrique,
i think i find a solution that works.

In file: class.upload.php (inside &gt;&gt; \administrator\components\com_k2\lib)
Arround the line: 2230
I take this &gt;&gt;
$this-&gt;file_src_mime = mime_content_type($this-&gt;file_src_pathname);
and change it to this &gt;&gt;
$this-&gt;file_src_mime = mime_content_type($this-&gt;file_src_name);

After that it works.

But it is very strange why in the v2.3 this isn't fixed :/

Thx for the help anyway ;)

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

  • kabeza
  • kabeza's Avatar
  • Offline
  • Senior Member
  • www.beza.com.ar
More
14 years 9 months ago #77237 by kabeza
Wow
It was just a so simple hack, would love to have known before lol
Thanks!

Vassilis said:Hi Enrique, i think i find a solution that works.

In file: class.upload.php (inside &gt;&gt; \administrator\components\com_k2\lib)
Arround the line: 2230
I take this &gt;&gt;
$this-&gt;file_src_mime = mime_content_type($this-&gt;file_src_pathname);
and change it to this &gt;&gt;
$this-&gt;file_src_mime = mime_content_type($this-&gt;file_src_name);

After that it works.

But it is very strange why in the v2.3 this isn't fixed :/

Thx for the help anyway ;)

Custom Joomla templates<br />www.beza.com.ar

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

More
14 years 6 months ago #77238 by Johnny Violent
Replied by Johnny Violent on topic bUG? Error k2 attachment renames a file when uploaded
Hm, that resolved the bug - unfortunately by updating to 2.4.1 the error occurs again. And editing the code results in a blank attachment filename. Any ideas?

Thx in advance,
Andi.

Enrique Becerra said:Wow It was just a so simple hack, would love to have known before lol
Thanks!

Vassilis said:Hi Enrique, i think i find a solution that works.
In file: class.upload.php (inside &gt;&gt; \administrator\components\com_k2\lib)
Arround the line: 2230
I take this &gt;&gt;
$this-&gt;file_src_mime = mime_content_type($this-&gt;file_src_pathname);
and change it to this &gt;&gt;
$this-&gt;file_src_mime = mime_content_type($this-&gt;file_src_name);

After that it works.

But it is very strange why in the v2.3 this isn't fixed :/

Thx for the help anyway ;)

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

  • kabeza
  • kabeza's Avatar
  • Offline
  • Senior Member
  • www.beza.com.ar
More
14 years 6 months ago #77239 by kabeza
I was going to update almost the same....
Hope someone can guide us with a new fix
Thanks

Custom Joomla templates<br />www.beza.com.ar

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

More
14 years 5 months ago #77240 by Frode
Disculpa si no te escribo en inglés...

Has podido averiguar cómo arreglar lo de subir adjuntos en la versión 2.4.1???


Enrique Becerra said:I was going to update almost the same.... Hope someone can guide us with a new fix
Thanks

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

  • kabeza
  • kabeza's Avatar
  • Offline
  • Senior Member
  • www.beza.com.ar
More
14 years 5 months ago #77241 by kabeza
English:
Hi, no... I could not find a fix yet in the 2.4.1 version. I guess in case someone finds a fix or workaround will post here so everyone can try

Spanish:
Hola, no... todavia no he encontrado una solucion en la subida de archivos de la version 2.4.1 y supongo que si alguien encuentra alguna solucion o alimaña la posteará aqui para que todos la veamos

Custom Joomla templates<br />www.beza.com.ar

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

More
14 years 5 months ago #77242 by Frode
Gracias Enrique,

I found this - community.getk2.org/profiles/blogs/are-you-experiencing-image
But I tried, what I anderstood, but still not working. Maybe someone can help me to undestand what to do...

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

More
13 years 10 months ago #77243 by Giulia Magnesa
Replied by Giulia Magnesa on topic bUG? Error k2 attachment renames a file when uploaded
Hello,

I have the same problem only with htm or html file. Do you know if it is a bug?

 

I use the last version of k2

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


Powered by Kunena Forum