Keyword

No image upload

More
14 years 6 months ago #78864 by Angelo
Replied by Angelo on topic No image upload
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.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 6 months ago #78865 by Nick Texidor
Replied by Nick Texidor on topic No image upload
Hey Angelo! :^)

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.

More
14 years 6 months ago #78866 by Angelo
Replied by Angelo on topic No image upload
ok thx i delete the folder and unzip again and upload folder again and i can see the file now!!!thx its works fine..thx for help Nick


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.

More
14 years 6 months ago #78867 by Vicente Gavara
Replied by Vicente Gavara on topic No image upload
Ten thousand thanks to Nick Texidor, his solution works!!!!

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

  • Smart Guy Computing
  • Smart Guy Computing's Avatar
  • Offline
  • New Member
More
14 years 5 months ago #78868 by Smart Guy Computing
Replied by Smart Guy Computing on topic No image upload
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!!!



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
  • Nick Texidor's Avatar
  • Visitor
14 years 5 months ago #78869 by Nick Texidor
Replied by Nick Texidor on topic No image upload
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.

More
14 years 5 months ago #78870 by ledouble
Replied by ledouble on topic No image upload
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.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 5 months ago #78871 by Nick Texidor
Replied by Nick Texidor on topic No image upload
Hi Bill,

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.

More
14 years 5 months ago #78872 by ledouble
Replied by ledouble on topic No image upload
Hi,

 

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.

More
14 years 3 months ago #78873 by william white
Replied by william white on topic No image upload
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.

More
14 years 3 months ago #78874 by Lefteris
Replied by Lefteris on topic No image upload
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.

More
14 years 3 months ago #78875 by william white
Replied by william white on topic No image upload
This always causes issues for me as people just want to post huge files to the new, and they want their sites to be fast as well....the two do not mix

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.

More
14 years 3 months ago #78876 by Lefteris
Replied by Lefteris on topic No image upload
You have no control over users' mental state and knowledge.  If they want to load a very large image he thinks he is intitled to do so;  me as a systems developer, in this case K2 developer, has to manage this moroon's grey matter and prevent him to do so by giving him alternatives or messages.  Therefore, I feel that K2 has to manage this issue and prevent users to mess up.  It might have been an oversight; I had more than enough in my lifetime (over-exitement is the major cause), but was decent enought to accept my mistakes, apologise, and fix it. So K2 team, you have a great product; the challenge here is to manage moroons and deslixic typos like me. However, my biggest issue with image uploads was apache security - not sizes, but again, the average user does not know about resizing images. I had to explain it to collegue today; he thought by resizing the image in MS Word will make it smaller in size..... a lot to learn. By the way, I found VSO Image Resizer to be the best for me.

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

More
14 years 2 months ago #78877 by Peschen
Replied by Peschen on topic No image upload
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.

More
14 years 3 weeks ago #78878 by Andy
Replied by Andy on topic No image upload
Well here I am at the last thread after reading everyones advise on how to upload these images and tried evrything.

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.

More
14 years 3 weeks ago #78879 by Andy
Replied by Andy on topic No image upload
Thanks for your reply Chris but have already tried uploading a small file.  I have just started uploading images direct to my server via my server control panel which is an absolute pain and will extend the time it is taking my to complete the project I am working on.  Really would like to get this working correctly!

 

I cant believe K2 could allow this bug to continue so long?

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

More
14 years 3 weeks ago #78880 by Andy
Replied by Andy on topic No image upload
I am still beating my head against the wall here....

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.

More
14 years 3 weeks ago #78881 by Andy
Replied by Andy on topic No image upload
Thanks Chris, I will give that a go tomorrow and let you know how it went.

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

More
14 years 4 days ago #78882 by Andy
Replied by Andy on topic No image upload
After almost 1 month of banging my head against the wall I am still no farther with uploading images in K2??????

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

More
13 years 10 months ago #78883 by Faris Nasir
Replied by Faris Nasir on topic No image upload
wow chris! i guess you're right about the photoshop-resized image, i just cannot upload those ones.

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.


Powered by Kunena Forum