Keyword

No image upload

More
13 years 11 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
13 years 11 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
13 years 11 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
13 years 11 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
13 years 10 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
13 years 10 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
13 years 10 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
13 years 10 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
13 years 9 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
13 years 8 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.


Powered by Kunena Forum