- Posts: 15
COMMUNITY FORUM
bUG? Error k2 attachment renames a file when uploaded
- Vassilis
-
Topic Author
- Offline
- New Member
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
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- kabeza
-
- Offline
- Senior Member
- www.beza.com.ar
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.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
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
-
- Offline
- Senior Member
- www.beza.com.ar
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
-
Topic Author
- Offline
- New Member
- Posts: 15
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
-
- Offline
- Senior Member
- www.beza.com.ar
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
-
Topic Author
- Offline
- New Member
- Posts: 15
i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->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
-
- Offline
- Senior Member
- www.beza.com.ar
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 >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->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.
- Johnny Violent
-
- Offline
- New Member
- Posts: 2
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 >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->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
-
- Offline
- Senior Member
- www.beza.com.ar
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.
- Frode
-
- Offline
- New Member
- Posts: 5
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
-
- Offline
- Senior Member
- www.beza.com.ar
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.
- Frode
-
- Offline
- New Member
- Posts: 5
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.
- Giulia Magnesa
-
- Offline
- Senior Member
- Posts: 74
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.