- Posts: 2
COMMUNITY FORUM
No image upload
- Angelo
-
- Offline
- New Member
thx and sry for my bad english
Please Log in or Create an account to join the conversation.
- Nick Texidor
-
- Visitor
Are you looking in the /components/com_k2/lib folder by any chance? It should be in the /administrator/components/com_k2/lib folder.
Angelo said:big hello from Greece!!!this is my first post here.my poblem is i join on k2 folder/lib but i dont have a file name class.upload.php the only file on folder is recaptchalib.php...can any one help me pls??? thx and sry for my bad english
Please Log in or Create an account to join the conversation.
- Angelo
-
- Offline
- New Member
- Posts: 2
Angelo said:big hello from Greece!!!this is my first post here.my poblem is i join on k2 folder/lib but i dont have a file name class.upload.php the only file on folder is recaptchalib.php...can any one help me pls??? thx and sry for my bad english
Please Log in or Create an account to join the conversation.
- Vicente Gavara
-
- Offline
- New Member
- Posts: 4
Please Log in or Create an account to join the conversation.
- Smart Guy Computing
-
- Offline
- New Member
- Posts: 9
Nick Texidor said:For those people having problems with the uploading of files, and have already ruled out a problem with permissions, I have a solution....
The quick fix is to edit /administrator/components/com_k2/lib/class.upload.php. Go to the init() function, and change the following variables from true to false:
$this->mime_fileinfo = false; // MIME detection with Fileinfo PECL extension
$this->mime_file = false; // MIME detection with UNIX file() command
$this->mime_magic = false; // MIME detection with mime_magic (mime_content_type())
You are 'SUPPOSED' to be able to override these settings in the calling script, however, because of a fundamental flaw in the design, it doesn't actually work :^)
I have documented the flaw in another post, but the above should at least get you working!
Please Log in or Create an account to join the conversation.
- Nick Texidor
-
- Visitor
Mark Bolden said:Hi Nick! I just wanted to say that I was having the exact same problem and your solution worked like a charm! thanks a million!!!
Please Log in or Create an account to join the conversation.
- ledouble
-
- Offline
- New Member
- Posts: 7
I tried the following solution kindly proposed by Nick Texidor (below), but it don't work. Did someone have a solution to enable the upload of images in the "Edit Item" - Image tab. Thank you in advance for your Help. Bill
$this->mime_fileinfo = false; // MIME detection with Fileinfo PECL extension
$this->mime_file = false; // MIME detection with UNIX file() command
$this->mime_magic = false; // MIME detection with mime_magic (mime_content_type())
Please Log in or Create an account to join the conversation.
- Nick Texidor
-
- Visitor
If changing the MIME type settings didn't work for you, there are a couple of other things you can try... first off, are the permissions on the /media/k2 folder set correctly? I usually set /media/k2 and all sub-directories to 777 to make sure that's not the problem.
If they're all ok, the other thing you could try is displaying the upload log to see if it shows any kind of problem: Edit the file /administrator/components/com_k2/models/item.php, and search for //image. About 9 or 10 lines down from that, you should see the following:
$handle = new Upload($image);
under that, add:
echo $handle->log;
Next, try and add an image to an item. You should see some debug output on the screen Have a quick scan and see if it shows anything obvious. If you're not sure, send me the text in a PM and I'll have a look for you.
Hope this helps a little
N
bill said:Hi all,
I tried the following solution kindly proposed by Nick Texidor (below), but it don't work. Did someone have a solution to enable the upload of images in the "Edit Item" - Image tab. Thank you in advance for your Help. Bill
$this->mime_fileinfo = false; // MIME detection with Fileinfo PECL extension
$this->mime_file = false; // MIME detection with UNIX file() command
$this->mime_magic = false; // MIME detection with mime_magic (mime_content_type())
Please Log in or Create an account to join the conversation.
- ledouble
-
- Offline
- New Member
- Posts: 7
Thank you very much for the suggestions and tips. I apologize but I had no time to try out your all the tips you gave to me. I will do it tomorrow and give you a feedbak about the results of it.
Thanks again, ciao
Bill
Nick Texidor said:
No worries... glad it's all working for you! :^) Mark Bolden said:Hi Nick! I just wanted to say that I was having the exact same problem and your solution worked like a charm! thanks a million!!!
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Remember check file names, turn off sef, set error reporting to highest, power must be plugged in because i can see the screen! been there, done that
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Chris said:
File names were not the only issue. The size of the files were the main issue.
To quickly resolve the issue I used Picasa 3 to select and then export the files to a new folder with each getting resized to 800px. At that point I could successfully upload Images and Galleries in both Items and Categories.
I believe the K2 resizing feature couldn't handle the originals. The originals were all about 1.7mb with resolution of 3072x2304px. The resized files were 170kb and 600x800px.
Anyway I'm posting this in the hopes of saving other some time. I was about to give up on K2 after uninstalling and reinstalling both K2 and Joomla a number of times; that or jump to a new host.
Cheers!
Chris
William White said:
Filenames ! again - This is unixalmost like the power cable
Remember check file names, turn off sef, set error reporting to highest, power must be plugged in because i can see the screen! been there, done that
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Pierre Cornelissen said:
Now if you hand this over to a customer, who is by the way not that computer literate, how will he know about this? I had a look at Joomla 1.6 and although there are not that many components and templates available, it is in my mind to switch to it as soon as possible. Unfortunately some of the larger sites have to suffice with J1.5 and relevant components. Being a distributed system developer myself it is not always possible to test the components on all the platforms and all the scenarios, but the basics as image reducing should have been in K2 from the start, no matter of the input size; or at least give the user a fair warning to resize the image before upload. Personally I use an external image resizer but the customer may have no inkling how to.
Chris said:
File names were not the only issue. The size of the files were the main issue.
To quickly resolve the issue I used Picasa 3 to select and then export the files to a new folder with each getting resized to 800px. At that point I could successfully upload Images and Galleries in both Items and Categories.
I believe the K2 resizing feature couldn't handle the originals. The originals were all about 1.7mb with resolution of 3072x2304px. The resized files were 170kb and 600x800px.
Anyway I'm posting this in the hopes of saving other some time. I was about to give up on K2 after uninstalling and reinstalling both K2 and Joomla a number of times; that or jump to a new host.
Cheers!
Chris
William White said:
Filenames ! again - This is unixalmost like the power cable
Remember check file names, turn off sef, set error reporting to highest, power must be plugged in because i can see the screen! been there, done that
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- Peschen
-
- Offline
- New Member
- Posts: 2
I had the same problem but the solution from Nick doesn't worked out for me.
All write permissions were just fine,
after that i found out, that my jpg file I wanted to upload had less than 435kb but exceeded more than 3000 pix.
I created a test jpg and that worked out for me just fine.
thanks for the other advice from nick anyway
greets Christiane PESCHEN
Please Log in or Create an account to join the conversation.
- Andy
-
- Offline
- New Member
- Posts: 6
I tried: editing class.upload file I tried: changing all permissions on k2 to 777
and I tried uploading jpeg & png images resized
I probably tried many other things also but after 5 hours of trying to solve this very problem I may have forgotten a few other attempts but either way they were all to no avail?
The only options left for me is to bang the side of the computer and see if that helps, so for the sake of my sanity and my computer PLEASE, is there a 100% way to solve this issue?
Waiting in vain:-)
Thanks
Chris said:
I posted back on page 3 but to recap, 800px seemed to be the sweet spot for me. 3000px simply would not work.
Peschen said:
Hi guys,
I had the same problem but the solution from Nick doesn't worked out for me.
All write permissions were just fine,
after that i found out, that my jpg file I wanted to upload had less than 435kb but exceeded more than 3000 pix.
I created a test jpg and that worked out for me just fine.
thanks for the other advice from nick anyway
greets Christiane PESCHEN
Please Log in or Create an account to join the conversation.
- Andy
-
- Offline
- New Member
- Posts: 6
I cant believe K2 could allow this bug to continue so long?
Please Log in or Create an account to join the conversation.
- Andy
-
- Offline
- New Member
- Posts: 6
Joomla: v1.5.23
K2: v2.4.1
Host: Rochen (reseller)
PHP: 5.2.17
Please Log in or Create an account to join the conversation.
- Andy
-
- Offline
- New Member
- Posts: 6
Please Log in or Create an account to join the conversation.
- Andy
-
- Offline
- New Member
- Posts: 6
Please Log in or Create an account to join the conversation.
- Faris Nasir
-
- Offline
- New Member
- Posts: 3
I resized the images with IrfanView and saved, then tried to upload it~ it works like a charm! :D
Please Log in or Create an account to join the conversation.